Function Outbound

  • Outbound decorator for WebSocket outbound messages. This annotation can be used for methods only.

    Supported Decorators:

    • @Auth
    • @Subscribe and @SubscribeFor
    • @ResendAfterAuthenticationChange
    • @LazyLoading
    • @SupportsCache
    • @PartialUpdates

    Parameters

    • method: string

      The method name for the outbound message. Outbound method names do not append to route methods.

    • Optional lazyLoading: boolean

      Indicates if the outbound message should be lazily loaded by clients.

    • Optional resendAfterAuthenticationChange: boolean

      Indicates if the outbound message should be resent after authentication changes.

    Returns ((target, propertyKey) => any)

    • The decorator function.
      • (target, propertyKey): any
      • Parameters

        • target: any
        • propertyKey: string

        Returns any

    Example

    Method annotation:

    class Example {
    @Outbound("d.example")
    async getData(connection: WebsocketConnection): Promise<any> {
    return [...];
    }
    }

Generated using TypeDoc