unknown: Decoder<unknown>

Decode the value as-is. You probably shouldn't use this, because there's a high chance you're abusing it as an escape-hatch. However, it has a valid use case for building custom decoders with the help of Decode.andThen. If you do that, please make sure that you keep everything safe.

Example

decode(Decode.unknown, true) === true
decode(Decode.unknown, undefined) === undefined
decode(Decode.unknown, NaN)

// This decoder really blindly passes on the value
const symbol = Symbol('my-symbol');
decode(Decode.unknown, symbol) === symbol

Generated using TypeDoc