Function Modifies

  • Once routes decorated with this decorator have been called, the provided outbound routes will be re-sent to all regular subscriptions and filtered subscriptions.

    Parameters

    • Rest ...routes: string[]

      The outbound methods that are modified and should be re-sent.

    Returns ((target, propertyKey) => void)

      • (target, propertyKey): void
      • Parameters

        • target: any
        • propertyKey: string

        Returns void

    Example

    Method annotation:

    @Route("example")
    class Example {

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

    @Route("save")
    @Modifies("d.data")
    async save(data: any, connection: WebsocketConnection): Promise<any> {
    [...]
    // outbound `d.data` is re-sent to all subscribed clients once this method has been executed successfully
    }
    }

Generated using TypeDoc