/// /// /// import { Class, TypedArray, ObservableLike, Primitive } from './types'; declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", ...("Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array")[]]; declare type ObjectTypeName = typeof objectTypeNames[number]; declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"]; declare type PrimitiveTypeName = typeof primitiveTypeNames[number]; export declare type TypeName = ObjectTypeName | PrimitiveTypeName; declare function is(value: unknown): TypeName; declare namespace is { var undefined: (value: unknown) => value is undefined; var string: (value: unknown) => value is string; var number: (value: unknown) => value is number; var bigint: (value: unknown) => value is bigint; var function_: (value: unknown) => value is Function; var null_: (value: unknown) => value is null; var class_: (value: unknown) => value is Class; var boolean: (value: unknown) => value is boolean; var symbol: (value: unknown) => value is symbol; var numericString: (value: unknown) => value is string; var array: (value: unknown, assertion?: ((value: T) => value is T) | undefined) => value is T[]; var buffer: (value: unknown) => value is Buffer; var nullOrUndefined: (value: unknown) => value is null | undefined; var object: (value: unknown) => value is object; var iterable: (value: unknown) => value is IterableIterator; var asyncIterable: (value: unknown) => value is AsyncIterableIterator; var generator: (value: unknown) => value is Generator; var asyncGenerator: (value: unknown) => value is AsyncGenerator; var nativePromise: (value: unknown) => value is Promise; var promise: (value: unknown) => value is Promise; var generatorFunction: (value: unknown) => value is GeneratorFunction; var asyncGeneratorFunction: (value: unknown) => value is (...args: any[]) => Promise; var asyncFunction: (value: unknown) => value is (...args: any[]) => Promise; var boundFunction: (value: unknown) => value is Function; var regExp: (value: unknown) => value is RegExp; var date: (value: unknown) => value is Date; var error: (value: unknown) => value is Error; var map: (value: unknown) => value is Map; var set: (value: unknown) => value is Set; var weakMap: (value: unknown) => value is WeakMap; var weakSet: (value: unknown) => value is WeakSet; var int8Array: (value: unknown) => value is Int8Array; var uint8Array: (value: unknown) => value is Uint8Array; var uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray; var int16Array: (value: unknown) => value is Int16Array; var uint16Array: (value: unknown) => value is Uint16Array; var int32Array: (value: unknown) => value is Int32Array; var uint32Array: (value: unknown) => value is Uint32Array; var float32Array: (value: unknown) => value is Float32Array; var float64Array: (value: unknown) => value is Float64Array; var bigInt64Array: (value: unknown) => value is BigInt64Array; var bigUint64Array: (value: unknown) => value is BigUint64Array; var arrayBuffer: (value: unknown) => value is ArrayBuffer; var sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer; var dataView: (value: unknown) => value is DataView; var directInstanceOf: (instance: unknown, class_: Class) => instance is T; var urlInstance: (value: unknown) => value is URL; var urlString: (value: unknown) => value is string; var truthy: (value: unknown) => boolean; var falsy: (value: unknown) => boolean; var nan: (value: unknown) => boolean; var primitive: (value: unknown) => value is Primitive; var integer: (value: unknown) => value is number; var safeInteger: (value: unknown) => value is number; var plainObject: (value: unknown) => value is Record; var typedArray: (value: unknown) => value is TypedArray; var arrayLike: (value: unknown) => value is ArrayLike; var inRange: (value: number, range: number | number[]) => value is number; var domElement: (value: unknown) => value is HTMLElement; var observable: (value: unknown) => value is ObservableLike; var nodeStream: (value: unknown) => value is NodeStream; var infinite: (value: unknown) => value is number; var evenInteger: (value: number) => value is number; var oddInteger: (value: number) => value is number; var emptyArray: (value: unknown) => value is never[]; var nonEmptyArray: (value: unknown) => value is unknown[]; var emptyString: (value: unknown) => value is ""; var nonEmptyString: (value: unknown) => value is string; var emptyStringOrWhitespace: (value: unknown) => value is string; var emptyObject: (value: unknown) => value is Record; var nonEmptyObject: (value: unknown) => value is Record; var emptySet: (value: unknown) => value is Set; var nonEmptySet: (value: unknown) => value is Set; var emptyMap: (value: unknown) => value is Map; var nonEmptyMap: (value: unknown) => value is Map; var propertyKey: (value: unknown) => value is string | number | symbol; var formData: (value: unknown) => value is FormData; var urlSearchParams: (value: unknown) => value is URLSearchParams; var any: (predicate: Predicate | Predicate[], ...values: unknown[]) => boolean; var all: (predicate: Predicate, ...values: unknown[]) => boolean; } export interface ArrayLike { readonly [index: number]: T; readonly length: number; } export interface NodeStream extends NodeJS.EventEmitter { pipe(destination: T, options?: { end?: boolean; }): T; } export declare type Predicate = (value: unknown) => boolean; export declare const enum AssertionTypeDescription { class_ = "Class", numericString = "string with a number", nullOrUndefined = "null or undefined", iterable = "Iterable", asyncIterable = "AsyncIterable", nativePromise = "native Promise", urlString = "string with a URL", truthy = "truthy", falsy = "falsy", nan = "NaN", primitive = "primitive", integer = "integer", safeInteger = "integer", plainObject = "plain object", arrayLike = "array-like", typedArray = "TypedArray", domElement = "HTMLElement", nodeStream = "Node.js Stream", infinite = "infinite number", emptyArray = "empty array", nonEmptyArray = "non-empty array", emptyString = "empty string", nonEmptyString = "non-empty string", emptyStringOrWhitespace = "empty string or whitespace", emptyObject = "empty object", nonEmptyObject = "non-empty object", emptySet = "empty set", nonEmptySet = "non-empty set", emptyMap = "empty map", nonEmptyMap = "non-empty map", evenInteger = "even integer", oddInteger = "odd integer", directInstanceOf = "T", inRange = "in range", any = "predicate returns truthy for any value", all = "predicate returns truthy for all values" } interface Assert { undefined: (value: unknown) => asserts value is undefined; string: (value: unknown) => asserts value is string; number: (value: unknown) => asserts value is number; bigint: (value: unknown) => asserts value is bigint; function_: (value: unknown) => asserts value is Function; null_: (value: unknown) => asserts value is null; class_: (value: unknown) => asserts value is Class; boolean: (value: unknown) => asserts value is boolean; symbol: (value: unknown) => asserts value is symbol; numericString: (value: unknown) => asserts value is string; array: (value: unknown, assertion?: (element: unknown) => asserts element is T) => asserts value is T[]; buffer: (value: unknown) => asserts value is Buffer; nullOrUndefined: (value: unknown) => asserts value is null | undefined; object: (value: unknown) => asserts value is Record; iterable: (value: unknown) => asserts value is Iterable; asyncIterable: (value: unknown) => asserts value is AsyncIterable; generator: (value: unknown) => asserts value is Generator; asyncGenerator: (value: unknown) => asserts value is AsyncGenerator; nativePromise: (value: unknown) => asserts value is Promise; promise: (value: unknown) => asserts value is Promise; generatorFunction: (value: unknown) => asserts value is GeneratorFunction; asyncGeneratorFunction: (value: unknown) => asserts value is AsyncGeneratorFunction; asyncFunction: (value: unknown) => asserts value is Function; boundFunction: (value: unknown) => asserts value is Function; regExp: (value: unknown) => asserts value is RegExp; date: (value: unknown) => asserts value is Date; error: (value: unknown) => asserts value is Error; map: (value: unknown) => asserts value is Map; set: (value: unknown) => asserts value is Set; weakMap: (value: unknown) => asserts value is WeakMap; weakSet: (value: unknown) => asserts value is WeakSet; int8Array: (value: unknown) => asserts value is Int8Array; uint8Array: (value: unknown) => asserts value is Uint8Array; uint8ClampedArray: (value: unknown) => asserts value is Uint8ClampedArray; int16Array: (value: unknown) => asserts value is Int16Array; uint16Array: (value: unknown) => asserts value is Uint16Array; int32Array: (value: unknown) => asserts value is Int32Array; uint32Array: (value: unknown) => asserts value is Uint32Array; float32Array: (value: unknown) => asserts value is Float32Array; float64Array: (value: unknown) => asserts value is Float64Array; bigInt64Array: (value: unknown) => asserts value is BigInt64Array; bigUint64Array: (value: unknown) => asserts value is BigUint64Array; arrayBuffer: (value: unknown) => asserts value is ArrayBuffer; sharedArrayBuffer: (value: unknown) => asserts value is SharedArrayBuffer; dataView: (value: unknown) => asserts value is DataView; urlInstance: (value: unknown) => asserts value is URL; urlString: (value: unknown) => asserts value is string; truthy: (value: unknown) => asserts value is unknown; falsy: (value: unknown) => asserts value is unknown; nan: (value: unknown) => asserts value is unknown; primitive: (value: unknown) => asserts value is Primitive; integer: (value: unknown) => asserts value is number; safeInteger: (value: unknown) => asserts value is number; plainObject: (value: unknown) => asserts value is Record; typedArray: (value: unknown) => asserts value is TypedArray; arrayLike: (value: unknown) => asserts value is ArrayLike; domElement: (value: unknown) => asserts value is HTMLElement; observable: (value: unknown) => asserts value is ObservableLike; nodeStream: (value: unknown) => asserts value is NodeStream; infinite: (value: unknown) => asserts value is number; emptyArray: (value: unknown) => asserts value is never[]; nonEmptyArray: (value: unknown) => asserts value is unknown[]; emptyString: (value: unknown) => asserts value is ''; nonEmptyString: (value: unknown) => asserts value is string; emptyStringOrWhitespace: (value: unknown) => asserts value is string; emptyObject: (value: unknown) => asserts value is Record; nonEmptyObject: (value: unknown) => asserts value is Record; emptySet: (value: unknown) => asserts value is Set; nonEmptySet: (value: unknown) => asserts value is Set; emptyMap: (value: unknown) => asserts value is Map; nonEmptyMap: (value: unknown) => asserts value is Map; propertyKey: (value: unknown) => asserts value is PropertyKey; formData: (value: unknown) => asserts value is FormData; urlSearchParams: (value: unknown) => asserts value is URLSearchParams; evenInteger: (value: number) => asserts value is number; oddInteger: (value: number) => asserts value is number; directInstanceOf: (instance: unknown, class_: Class) => asserts instance is T; inRange: (value: number, range: number | number[]) => asserts value is number; any: (predicate: Predicate | Predicate[], ...values: unknown[]) => void | never; all: (predicate: Predicate, ...values: unknown[]) => void | never; } export declare const assert: Assert; export default is; export { Class, TypedArray, ObservableLike, Primitive } from './types';