import { isPresentArray } from "@starbeam/core-utils"; type FixedArray = SoFar["length"] extends N ? SoFar : FixedArray; type ReadonlyFixedArray = SoFar["length"] extends N ? SoFar : ReadonlyFixedArray; declare function isPresent(value: T | null | undefined): value is Exclude; declare function exhaustive(_value: never, type?: string): never; declare function isEqual(value: T): (other: unknown) => other is T; declare function isNotEqual(value: T): (other: U) => other is Exclude; declare function isObject(value: unknown): value is object; declare function isWeakKey(value: unknown): value is Record; interface HasLength { (value: T[]): value is FixedArray; (value: readonly T[]): value is ReadonlyFixedArray; } declare function hasLength(length: L): HasLength; declare const hasItems: typeof isPresentArray; declare function isNullable(verifier: (value: In) => value is Out): (value: In | null) => value is Out | null; declare function isOneOf(...verifiers: ((value: In) => value is Out)[]): (value: In) => value is Out; declare function hasType(type: K): (value: any) => value is TypeOfTypes[K]; interface TypeOfTypes { string: string; number: number; bigint: bigint; boolean: boolean; symbol: symbol; undefined: undefined; null: null; object: object; // eslint-disable-next-line @typescript-eslint/no-explicit-any function: (...args: any[]) => unknown; } type TypeOf = keyof TypeOfTypes; declare class VerificationError extends Error { readonly expectation: Expectation; constructor(message: string, expectation: Expectation); } type VerifyFn = (value: Value, check: (input: Input) => input is Output, error?: Expectation) => asserts value is Output & Value; declare function verify(value: Value, check: (input: Input) => input is Output, error?: Expectation): asserts value is Output & Value; declare namespace verify { var noop: typeof verify | { (value: Value, check: (input: Input) => input is Output, error?: Expectation | undefined): void; (value: Value_1, check: (input: Input_1) => input is Output_1, error?: Expectation | undefined): asserts value is Output_1 & Value_1; }; } declare function verified(value: T, check: (input: T) => input is U, error?: Expectation): U; declare namespace verified { var noop: (value: T, _check: (input: T) => input is U, _error?: Expectation | undefined) => U; } // eslint-disable-next-line @typescript-eslint/no-explicit-any declare class Expectation { #private; static create(description?: string): Expectation; static merge(associated: Expectation | undefined, specified: Expectation | undefined): Expectation | undefined; private constructor(); as(description: string): Expectation; update(updater: Updater): Expectation; toBe(kind: string): Expectation; toHave(items: string): Expectation; butGot(kind: string | ((value: NewIn) => string)): Expectation; when(situation: string): Expectation; message(input: In): string; } type Relationship = "to be" | "to have" | "to be one of"; type To = [ relationship: Relationship, kind: string ]; declare function expected(description?: string): Expectation; declare namespace expected { var as: typeof expected; var toBe: (kind: string) => Expectation; var toHave: (items: string) => Expectation; var when: (situation: string) => Expectation; var butGot: (kind: string | ((input: In) => string)) => Expectation; var associate: any, In>(check: Check, expectation: Expectation) => Check extends infer C ? C : never; var updated: (check: (input: In) => boolean, updater: Updater) => Expectation; } interface Updater { description?: (description: string | undefined) => string | undefined; to?: (to: To | undefined) => string | To | undefined; actual?: (actual: ((input: In) => string | undefined) | undefined) => ((input: NewIn) => string | undefined) | undefined; when?: (when: string | undefined) => string | undefined; } declare const verifiedDev: typeof verified; declare const verify$0: VerifyFn; declare const verified$0: typeof verifiedDev["noop"]; export { exhaustive, hasItems, hasLength, isEqual, isNotEqual, isNullable, isObject, isPresent, isWeakKey, isOneOf, TypeOf, hasType, Expectation, expected, VerificationError, verify$0 as verify, verified$0 as verified }; //# sourceMappingURL=index.d.ts.map