import type { Err } from './types'; /** * Creates an immutable {@link Err} value with no attached data. * * The returned object is `Object.freeze()`-d. This function **never throws**. * * @returns A frozen `Err` with `data` typed as `never`. * * @example * ```ts * const e = err(); * ``` */ export declare function err(): Err; /** * Creates an immutable {@link Err} value carrying the given data. * * The returned object is `Object.freeze()`-d. This function **never throws**. * * @param data - Any value describing the error (string, object, number, etc.). * @returns A frozen `Err` with `data` set to the provided value. * * @example * ```ts * const e = err({ code: 'TIMEOUT', retryAfter: 3000 }); * console.log(e.data.code); // 'TIMEOUT' * ``` */ export declare function err(data: E): Err;