Interface ISubscriptions<T>

The pub/sub topic subscriptions interface.

interface ISubscriptions<T> {
    data: ((nodeId, content) => void);
    file: ((nodeId, content) => void);
}

Type Parameters

  • T

Events

Events

data: ((nodeId, content) => void)

data - To subscribe to data events.

Type declaration

    • (nodeId, content): void
    • Parameters

      • nodeId: string

        The node ID of the node who published the data.

      • content: T

        The content that was published.

      Returns void

file: ((nodeId, content) => void)

file - To subscribe to file events.

Type declaration

    • (nodeId, content): void
    • Parameters

      • nodeId: string

        The node ID of the node who published the file.

      • content: File

        The file that was published.

      Returns void

Generated using TypeDoc