Decoder that only accepts a specific value.
The exact value to accept
A decoder that only accepts the specified value
const oneDecoder = JsonDecoder.isExactly(1);oneDecoder.decode(1); // Ok<number>({value: 1})oneDecoder.decode(2); // Err({error: '2 is not exactly 1'}) Copy
const oneDecoder = JsonDecoder.isExactly(1);oneDecoder.decode(1); // Ok<number>({value: 1})oneDecoder.decode(2); // Err({error: '2 is not exactly 1'})
Decoder that only accepts a specific value.