ts.data.json - v4.2.1
    Preparing search index...

    Type Alias FromDecoder<D>

    FromDecoder: OutputOf<D>

    Extracts the type parameter T from a JsonDecoder.Decoder.

    This utility type is useful when you want to get the type that a decoder will produce, without having to manually specify it.

    Type Parameters

    • D

      A JsonDecoder.Decoder type

    const userDecoder = JsonDecoder.object({
    id: JsonDecoder.number(),
    name: JsonDecoder.string()
    }, 'User');

    // You can extract the type from the decoder:
    type User = JsonDecoder.FromDecoder<typeof userDecoder>;