MELCloud & MELCloud Home API for Node.js - v48.2.0
    Preparing search index...

    Function syncDevices

    • Method decorator factory that invokes a sync notification after the decorated method resolves. The host implements notifySync structurally — facades enrich the payload with ids before delegating, BaseAPI emits straight through the lifecycle emitter. No action is taken when the host doesn't expose the hook.

      Intended for one-shot post-method notifications; this is not a subscription. Exceptions thrown by the consumer's callback propagate — the decorator does not swallow them, so a buggy sync handler surfaces on the caller rather than dying silently.

      Parameters

      • root0: { type?: DeviceType } = {}

        Options object.

        • Optionaltype?: DeviceType

          Optional device type forwarded in the payload.

      Returns <TArgs extends readonly unknown[], TResult>(
          target: (...args: TArgs) => Promise<TResult>,
          _context: ClassMethodDecoratorContext,
      ) => (...args: TArgs) => Promise<TResult>

      A method decorator that triggers sync after execution.