• Creates a Decoder for Envelope<T> from the namespace and a Decoder<T>. It fails when found a namespace that didn't equal to namespace.

    Parameters

    • namespace: string

      The expected namespace of data.

    Returns (<T>(decodeT) => Decoder<Readonly<{
        namespace: string;
        payload: T;
    }>>)

    The new decoder for Envelope<T>.

      • <T>(decodeT): Decoder<Readonly<{
            namespace: string;
            payload: T;
        }>>
      • Type Parameters

        • T

        Parameters

        Returns Decoder<Readonly<{
            namespace: string;
            payload: T;
        }>>

Generated using TypeDoc