Decoder that always fails with the given error message.
The error message to return
A decoder that always fails with the specified error
const failDecoder = JsonDecoder.fail<string>('This decoder always fails');failDecoder.decode('anything'); // Err({error: 'This decoder always fails'}) Copy
const failDecoder = JsonDecoder.fail<string>('This decoder always fails');failDecoder.decode('anything'); // Err({error: 'This decoder always fails'})
Decoder that always fails with the given error message.