MELCloud & MELCloud Home API for Node.js - v23.3.3
    Preparing search index...

    Function isDeviceOfType

    • Type guard that narrows a DeviceModelAny to a specific DeviceModel variant. Overloads ensure the predicate type is always assignable to the union member.

      Parameters

      • device: DeviceModelAny

        The device model to narrow.

      • type: 0

        The expected device type literal.

      Returns device is DeviceModel<0>

      Whether the device matches the given type.

    • Type guard that narrows a DeviceModelAny to a specific DeviceModel variant. Overloads ensure the predicate type is always assignable to the union member.

      Parameters

      • device: DeviceModelAny

        The device model to narrow.

      • type: 1

        The expected device type literal.

      Returns device is DeviceModel<1>

      Whether the device matches the given type.

    • Type guard that narrows a DeviceModelAny to a specific DeviceModel variant. Overloads ensure the predicate type is always assignable to the union member.

      Parameters

      • device: DeviceModelAny

        The device model to narrow.

      • type: 3

        The expected device type literal.

      Returns device is DeviceModel<3>

      Whether the device matches the given type.