/**
* Type identifier stored on `EncodingError` values and used by
* `isEncodingError`.
*
* **When to use**
*
* Use when implementing low-level `EncodingError`-compatible values that need
* to carry the runtime marker.
*
* **Details**
*
* This marker is part of the runtime representation of `EncodingError`. Prefer
* `isEncodingError` when narrowing unknown values.
*
* @see {@link isEncodingError} for the public guard that checks this marker
*
* @stability stable
* @category type IDs
* @since 4.0.0
*/
export declare const EncodingErrorTypeId: "~effect/encoding/EncodingError";
/**
* Literal type of the `EncodingErrorTypeId` marker.
*
* **When to use**
*
* Use to type the marker carried by `EncodingError` values.
*
* @stability stable
* @category type IDs
* @since 4.0.0
*/
export type EncodingErrorTypeId = typeof EncodingErrorTypeId;
declare const EncodingError_base: new = {}>(args: import("../Types.ts").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("../Cause.ts").YieldableError & {
readonly _tag: "EncodingError";
} & Readonly;
/**
* Error returned when an encoding or decoding operation cannot process its input.
*
* **When to use**
*
* Use when you need to handle or inspect failures from encoding or decoding
* operations.
*
* **Details**
*
* The error records whether the failure happened during encoding or decoding,
* which encoding module reported it, the original input, and a human-readable
* message.
*
* @see {@link isEncodingError} for checking whether a value is an EncodingError
*
* @stability stable
* @category errors
* @since 4.0.0
*/
export declare class EncodingError extends EncodingError_base<{
kind: "Decode" | "Encode";
module: string;
input: unknown;
message: string;
}> {
/**
* Marks this value as an encoding or decoding error for runtime guards.
*
* **When to use**
*
* Use to identify `EncodingError` instances through `isEncodingError`.
*
* @since 4.0.0
*/
readonly [EncodingErrorTypeId]: EncodingErrorTypeId;
}
/**
* 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 {@link EncodingError} for the structured error produced by failed
* encoding and decoding operations
*
* @stability stable
* @category guards
* @since 4.0.0
*/
export declare const isEncodingError: (u: unknown) => u is EncodingError;
export {};
//# sourceMappingURL=EncodingError.d.ts.map