effect-io-ai

Package: effect
Module: Encoding

Encoding.isEncodingError

Checks whether a value is an EncodingError.

When to use

Use to narrow an unknown value before handling it as an EncodingError from encoding or decoding code.

Details

Returns true when the value carries the EncodingErrorTypeId marker and narrows the value to EncodingError.

See

Signature

declare const isEncodingError: (u: unknown) => u is EncodingError

Source

Since v4.0.0