Hiyve Components - v1.0.0
    Preparing search index...

    Interface Transport

    Minimal transport contract the store needs. Every binding-supplied adapter MUST implement it; the store doesn't care what's underneath.

    interface Transport {
        publish<T>(topic: string, payload: T): void;
        subscribe<T>(
            topic: string,
            handler: TransportSubscribeHandler<T>,
        ): () => void;
    }
    Index

    Methods

    • Publish a JSON-serialisable payload on topic. Returns synchronously.

      Type Parameters

      • T

      Parameters

      • topic: string
      • payload: T

      Returns void