Interface ISubscriptions<T>

The pub/sub topic subscriptions interface.

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

Type Parameters

  • T

Events

Events

data: ((nodeId: string, content: T) => 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: string, content: File) => 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