/** * Represents an object that can be used to build a list of assertions. * * @example * * ```ts * import { ZAssert, createError } from '@zthun/helpful-fn'; * * const user = readUser(); * * ZAssert * .claim(user.name != null, 'User name is required') * .claim(user.email != null, 'User email is required') * .assert((m) => createError(m)); * ``` */ export declare class ZAssert { /** * Initializes a new instance of a ZAssert with one claim. * * @param claim - * The claim to make. * @param msg - * The message to throw if the claim is false. * * @returns * A new ZAssert object with an initial claim. */ static claim(claim: boolean, msg: any): ZAssert; private _messages; /** * Initializes a new instance of this object. */ private constructor(); /** * Adds a claim. * * @param claim - * The claim predicate. * @param msg - * The message to add if the claim fails. * * @returns This object. */ claim(claim: boolean, msg: any): this; /** * Runs the assertion. * * @param fail - * The factory that is responsible for returning the specified error to throw. */ assert(fail: (message: any) => E): void; }