Method decorator factory that invokes the host's sync notification
after the decorated method resolves, forwarding params verbatim.
Generic over the consumer's sync-params shape (device ids, a type
filter…) like SessionAPI itself: @syncDevices({ type }) forwards
a payload, @syncDevices() notifies without one. The host contract
is structural: the returned method's this names it, which types the
body and any .call(host) use, but a TC39 application site does not
check it — the method's own type carries no this — so it is
documented, not enforced, as it was in the SDKs' own copies. No
action is taken when the host exposes no 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.
Method decorator factory that invokes the host's sync notification after the decorated method resolves, forwarding
paramsverbatim. Generic over the consumer's sync-params shape (device ids, a type filter…) likeSessionAPIitself:@syncDevices({ type })forwards a payload,@syncDevices()notifies without one. The host contract is structural: the returned method'sthisnames it, which types the body and any.call(host)use, but a TC39 application site does not check it — the method's own type carries nothis— so it is documented, not enforced, as it was in the SDKs' own copies. No action is taken when the host exposes no 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.