import * as is from "./guards"; import type { IndexedObject, IndexedRecord, NumStr, empty as baseEmpty, stringU as baseStringU, unknowns as baseUnknowns, types } from "../types"; export { _false as false, _null as null, _true as true, _undefined as undefined }; export declare const array: InlineAssertion & Readonly<{ /** * Asserts that value type is T[]. * @param value - Value. * @param guard - Guard for type T. * @returns Value if value type is T[]. * @throws Error otherwise. */ of: (value: unknown, guard: is.Guard) => readonly T[]; }>; export declare const arrayU: InlineAssertion; export declare const arrays: InlineAssertion; export declare const arraysU: InlineAssertion; export declare const boolean: InlineAssertion; export declare const booleanU: InlineAssertion; export declare const booleans: InlineAssertion; export declare const booleansU: InlineAssertion; export declare const empty: InlineAssertion; export declare const indexedObject: InlineAssertion & Readonly<{ /** * Asserts that value type is IndexedObject\. * @param value - Value. * @param guard - Guard for type T. * @returns Value if value type is IndexedObject\. * @throws Error otherwise. */ of: (value: unknown, guard: is.Guard) => IndexedObject; }>; export declare const indexedObjects: InlineAssertion; export declare const indexedObjectsU: InlineAssertion; export declare const map: InlineAssertion> & Readonly<{ /** * Asserts that value type is Map\. * @param value - Value. * @param keyGuard - Key guard. * @param valueGuard - Value guard. * @returns Value if value type is Map\. * @throws Error otherwise. */ of: (value: unknown, keyGuard: is.Guard, valueGuard: is.Guard) => ReadonlyMap; }>; export declare const mapU: InlineAssertion | undefined>; export declare const maps: InlineAssertion[]>; export declare const mapsU: InlineAssertion[] | undefined>; export declare const never: InlineAssertion; export declare const numStr: InlineAssertion; export declare const numStrU: InlineAssertion; export declare const numStrs: InlineAssertion; export declare const numStrsU: InlineAssertion; export declare const number: InlineAssertion; export declare const numberU: InlineAssertion; export declare const numbers: InlineAssertion; export declare const numbersU: InlineAssertion; export declare const object: InlineAssertion; export declare const objectU: InlineAssertion; export declare const objects: InlineAssertion; export declare const objectsU: InlineAssertion; export declare const propertyKey: InlineAssertion; export declare const propertyKeyU: InlineAssertion; export declare const propertyKeys: InlineAssertion; export declare const propertyKeysU: InlineAssertion; export declare const set: InlineAssertion> & Readonly<{ /** * Asserts that value type is Set\. * @param value - Value. * @param guard - Guard for type T. * @returns Value if value type is Set\. * @throws Error otherwise. */ of: (value: unknown, guard: is.Guard) => ReadonlySet; }>; export declare const setU: InlineAssertion | undefined>; export declare const sets: InlineAssertion[]>; export declare const setsU: InlineAssertion[] | undefined>; export declare const string: InlineAssertion; export declare const stringU: InlineAssertion; export declare const strings: InlineAssertion; export declare const stringsU: InlineAssertion; export declare const symbol: InlineAssertion; export declare const symbolU: InlineAssertion; export declare const symbols: InlineAssertion; export declare const symbolsU: InlineAssertion; export declare const unknown: InlineAssertion; export declare const unknowns: InlineAssertion; export declare const unknownsU: InlineAssertion; export declare const not: { readonly array: ExclusionInlineAssertion; readonly boolean: ExclusionInlineAssertion; readonly empty: ExclusionInlineAssertion; readonly false: ExclusionInlineAssertion; readonly indexedObject: ExclusionInlineAssertion; readonly map: ExclusionInlineAssertion>; readonly null: ExclusionInlineAssertion; readonly numStr: ExclusionInlineAssertion; readonly number: ExclusionInlineAssertion; readonly object: ExclusionInlineAssertion; readonly propertyKey: ExclusionInlineAssertion; readonly set: ExclusionInlineAssertion>; readonly string: ExclusionInlineAssertion; readonly stringU: ExclusionInlineAssertion; readonly symbol: ExclusionInlineAssertion; readonly true: ExclusionInlineAssertion; readonly undefined: ExclusionInlineAssertion; }; /** * Asserts that value type is T. * @param value - Value. * @param guard - Guard for type T. * @returns Value if value type is T. * @throws Error otherwise. */ export declare function byGuard(value: unknown, guard: is.Guard): T; /** * Asserts that value type is T. * @param value - Value. * @returns Value if value type is T. * @throws Error otherwise. */ export declare function callable(value: unknown): T; /** * Asserts that value type is T. * @param value - Value. * @returns Value if value type is T. * @throws Error otherwise. */ export declare function constructor(value: unknown): T; /** * Asserts that value type is T. * @param value - Value. * @param en - Validation object. * @returns Value if value type is T. * @throws Error otherwise. */ export declare function enumeration(value: unknown, en: IndexedRecord): T; /** * Asserts that value type is T. * @param value - Value. * @param ctor - Constructor. * @returns Value if value type is T. * @throws Error otherwise. */ export declare function instanceOf(value: unknown, ctor: types.fn.Constructor): T; /** * Asserts that value type is T[]. * @param value - Value. * @param ctor - Constructor. * @returns Value if value type is T[]. * @throws Error otherwise. */ export declare function instancesOf(value: unknown, ctor: types.fn.Constructor): readonly T[]; export interface ExclusionInlineAssertion { /** * Asserts value type. * @param value - Value. * @returns Value if its type is not T. * @throws Error otherwise. */ (value: V): Exclude; } export interface InlineAssertion { /** * Asserts value type. * @param value - Value. * @returns Value if its type is T. * @throws Error otherwise. */ (value: unknown): T; } declare const _false: InlineAssertion; declare const _null: InlineAssertion; declare const _true: InlineAssertion; declare const _undefined: InlineAssertion; //# sourceMappingURL=inline-assertions.d.ts.map