• Make a decoder that always succeeds with the given value. The input is basically ignored.

    Type Parameters

    • T

    Parameters

    • value: T

      The returned value

    Returns Decoder<T>

    A decoder that always succeeds with the given value when executed

    Example

    const decoder = Decode.succeed(42);

    decode(decoder, 'string') === 42
    decode(decoder, {}) === 42
    decode(decoder, null) === 42
    decode(decoder, 42) === 42

Generated using TypeDoc