import type { Guard } from '../utils/types.js'; /** * Assert that a condition is true. Throws `AssertionError` if false. * Narrows the condition to `true` in the subsequent code. * * @example * ```ts * assert(user !== null, 'User must exist'); * user.name; // OK — TypeScript knows user is not null * ``` */ export declare function assert(condition: unknown, message?: string): asserts condition; /** * Assert that a value is defined (not undefined). * Narrows away `undefined`. * * @example * ```ts * const val: string | undefined = getConfig('key'); * assertDefined(val, 'Config key is required'); * val.toUpperCase(); // OK * ``` */ export declare function assertDefined(value: T, message?: string): asserts value is Exclude; /** * Assert that a value is not null and not undefined. * Narrows away `null | undefined`. * * @example * ```ts * assertNonNull(result); * result.doSomething(); // OK * ``` */ export declare function assertNonNull(value: T, message?: string): asserts value is NonNullable; /** * Assert that a value passes a type guard. * Narrows to the guarded type. * * @example * ```ts * assertType(input, isString, 'Expected string input'); * input.toUpperCase(); // OK — narrowed to string * ``` */ export declare function assertType(value: unknown, guard: Guard, message?: string): asserts value is T; /** * Assert that a value is truthy. * Narrows away falsy values (false, 0, '', null, undefined, NaN). */ export declare function assertTruthy(value: T, message?: string): asserts value is NonNullable; //# sourceMappingURL=assertions.d.ts.map