import type { Falsy, NonFalsy } from "."; export declare class AssertError extends Error { } /** @example assert(typeof maybeString == "string", () => `Got ${typeof maybeString} instead of string`) */ export declare function assert(value: T, message?: ((value: T & Falsy) => string) | string): asserts value; /** Like typescript's non-null assertion operator (postfix `!`), but enforced at runtime. * @example ensure(objectOrUndefined, "Got undefined instead of object").property */ export declare const ensure: (value: T, message?: ((value: T & Falsy) => string) | string) => NonFalsy;