UNPKG

32.5 kBTypeScriptView Raw
1import type { ArrayLike, Class, Falsy, NodeStream, NonEmptyString, ObservableLike, Predicate, Primitive, TypedArray, WeakRef, Whitespace } from './types.js';
2type ExtractFromGlobalConstructors<Name extends string> = Name extends string ? typeof globalThis extends Record<Name, new (...arguments_: any[]) => infer T> ? T : never : never;
3type NodeBuffer = ExtractFromGlobalConstructors<'Buffer'>;
4declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "WeakRef", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", "NaN", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"];
5type ObjectTypeName = typeof objectTypeNames[number];
6declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
7type PrimitiveTypeName = typeof primitiveTypeNames[number];
8export type TypeName = ObjectTypeName | PrimitiveTypeName;
9declare const assertionTypeDescriptions: readonly ["positive number", "negative number", "Class", "string with a number", "null or undefined", "Iterable", "AsyncIterable", "native Promise", "EnumCase", "string with a URL", "truthy", "falsy", "primitive", "integer", "plain object", "TypedArray", "array-like", "tuple-like", "Node.js Stream", "infinite number", "empty array", "non-empty array", "empty string", "empty string or whitespace", "non-empty string", "non-empty string and not whitespace", "empty object", "non-empty object", "empty set", "non-empty set", "empty map", "non-empty map", "PropertyKey", "even integer", "odd integer", "T", "in range", "predicate returns truthy for any value", "predicate returns truthy for all values", "valid Date", "valid length", "whitespace string", "Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "WeakRef", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", "NaN", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array", "null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
10export type AssertionTypeDescription = typeof assertionTypeDescriptions[number];
11declare function detect(value: unknown): TypeName;
12declare const is: typeof detect & {
13 all: typeof isAll;
14 any: typeof isAny;
15 array: typeof isArray;
16 arrayBuffer: typeof isArrayBuffer;
17 arrayLike: typeof isArrayLike;
18 asyncFunction: typeof isAsyncFunction;
19 asyncGenerator: typeof isAsyncGenerator;
20 asyncGeneratorFunction: typeof isAsyncGeneratorFunction;
21 asyncIterable: typeof isAsyncIterable;
22 bigint: typeof isBigint;
23 bigInt64Array: typeof isBigInt64Array;
24 bigUint64Array: typeof isBigUint64Array;
25 blob: typeof isBlob;
26 boolean: typeof isBoolean;
27 boundFunction: typeof isBoundFunction;
28 buffer: typeof isBuffer;
29 class: typeof isClass;
30 dataView: typeof isDataView;
31 date: typeof isDate;
32 detect: typeof detect;
33 directInstanceOf: typeof isDirectInstanceOf;
34 emptyArray: typeof isEmptyArray;
35 emptyMap: typeof isEmptyMap;
36 emptyObject: typeof isEmptyObject;
37 emptySet: typeof isEmptySet;
38 emptyString: typeof isEmptyString;
39 emptyStringOrWhitespace: typeof isEmptyStringOrWhitespace;
40 enumCase: typeof isEnumCase;
41 error: typeof isError;
42 evenInteger: typeof isEvenInteger;
43 falsy: typeof isFalsy;
44 float32Array: typeof isFloat32Array;
45 float64Array: typeof isFloat64Array;
46 formData: typeof isFormData;
47 function: typeof isFunction;
48 generator: typeof isGenerator;
49 generatorFunction: typeof isGeneratorFunction;
50 htmlElement: typeof isHtmlElement;
51 infinite: typeof isInfinite;
52 inRange: typeof isInRange;
53 int16Array: typeof isInt16Array;
54 int32Array: typeof isInt32Array;
55 int8Array: typeof isInt8Array;
56 integer: typeof isInteger;
57 iterable: typeof isIterable;
58 map: typeof isMap;
59 nan: typeof isNan;
60 nativePromise: typeof isNativePromise;
61 negativeNumber: typeof isNegativeNumber;
62 nodeStream: typeof isNodeStream;
63 nonEmptyArray: typeof isNonEmptyArray;
64 nonEmptyMap: typeof isNonEmptyMap;
65 nonEmptyObject: typeof isNonEmptyObject;
66 nonEmptySet: typeof isNonEmptySet;
67 nonEmptyString: typeof isNonEmptyString;
68 nonEmptyStringAndNotWhitespace: typeof isNonEmptyStringAndNotWhitespace;
69 null: typeof isNull;
70 nullOrUndefined: typeof isNullOrUndefined;
71 number: typeof isNumber;
72 numericString: typeof isNumericString;
73 object: typeof isObject;
74 observable: typeof isObservable;
75 oddInteger: typeof isOddInteger;
76 plainObject: typeof isPlainObject;
77 positiveNumber: typeof isPositiveNumber;
78 primitive: typeof isPrimitive;
79 promise: typeof isPromise;
80 propertyKey: typeof isPropertyKey;
81 regExp: typeof isRegExp;
82 safeInteger: typeof isSafeInteger;
83 set: typeof isSet;
84 sharedArrayBuffer: typeof isSharedArrayBuffer;
85 string: typeof isString;
86 symbol: typeof isSymbol;
87 truthy: typeof isTruthy;
88 tupleLike: typeof isTupleLike;
89 typedArray: typeof isTypedArray;
90 uint16Array: typeof isUint16Array;
91 uint32Array: typeof isUint32Array;
92 uint8Array: typeof isUint8Array;
93 uint8ClampedArray: typeof isUint8ClampedArray;
94 undefined: typeof isUndefined;
95 urlInstance: typeof isUrlInstance;
96 urlSearchParams: typeof isUrlSearchParams;
97 urlString: typeof isUrlString;
98 validDate: typeof isValidDate;
99 validLength: typeof isValidLength;
100 weakMap: typeof isWeakMap;
101 weakRef: typeof isWeakRef;
102 weakSet: typeof isWeakSet;
103 whitespaceString: typeof isWhitespaceString;
104};
105export declare function isAll(predicate: Predicate, ...values: unknown[]): boolean;
106export declare function isAny(predicate: Predicate | Predicate[], ...values: unknown[]): boolean;
107export declare function isArray<T = unknown>(value: unknown, assertion?: (value: T) => value is T): value is T[];
108export declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
109export declare function isArrayLike<T = unknown>(value: unknown): value is ArrayLike<T>;
110export declare function isAsyncFunction<T = unknown>(value: unknown): value is ((...arguments_: any[]) => Promise<T>);
111export declare function isAsyncGenerator(value: unknown): value is AsyncGenerator;
112export declare function isAsyncGeneratorFunction(value: unknown): value is ((...arguments_: any[]) => Promise<unknown>);
113export declare function isAsyncIterable<T = unknown>(value: unknown): value is AsyncIterable<T>;
114export declare function isBigint(value: unknown): value is bigint;
115export declare function isBigInt64Array(value: unknown): value is BigInt64Array;
116export declare function isBigUint64Array(value: unknown): value is BigUint64Array;
117export declare function isBlob(value: unknown): value is Blob;
118export declare function isBoolean(value: unknown): value is boolean;
119export declare function isBoundFunction(value: unknown): value is Function;
120/**
121Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer)
122*/
123export declare function isBuffer(value: unknown): value is NodeBuffer;
124export declare function isClass<T = unknown>(value: unknown): value is Class<T>;
125export declare function isDataView(value: unknown): value is DataView;
126export declare function isDate(value: unknown): value is Date;
127export declare function isDirectInstanceOf<T>(instance: unknown, class_: Class<T>): instance is T;
128export declare function isEmptyArray(value: unknown): value is never[];
129export declare function isEmptyMap(value: unknown): value is Map<never, never>;
130export declare function isEmptyObject<Key extends keyof any = string>(value: unknown): value is Record<Key, never>;
131export declare function isEmptySet(value: unknown): value is Set<never>;
132export declare function isEmptyString(value: unknown): value is '';
133export declare function isEmptyStringOrWhitespace(value: unknown): value is '' | Whitespace;
134export declare function isEnumCase<T = unknown>(value: unknown, targetEnum: T): value is T[keyof T];
135export declare function isError(value: unknown): value is Error;
136export declare function isEvenInteger(value: unknown): value is number;
137export declare function isFalsy(value: unknown): value is Falsy;
138export declare function isFloat32Array(value: unknown): value is Float32Array;
139export declare function isFloat64Array(value: unknown): value is Float64Array;
140export declare function isFormData(value: unknown): value is FormData;
141export declare function isFunction(value: unknown): value is Function;
142export declare function isGenerator(value: unknown): value is Generator;
143export declare function isGeneratorFunction(value: unknown): value is GeneratorFunction;
144export declare function isHtmlElement(value: unknown): value is HTMLElement;
145export declare function isInfinite(value: unknown): value is number;
146export declare function isInRange(value: number, range: number | [number, number]): value is number;
147export declare function isInt16Array(value: unknown): value is Int16Array;
148export declare function isInt32Array(value: unknown): value is Int32Array;
149export declare function isInt8Array(value: unknown): value is Int8Array;
150export declare function isInteger(value: unknown): value is number;
151export declare function isIterable<T = unknown>(value: unknown): value is Iterable<T>;
152export declare function isMap<Key = unknown, Value = unknown>(value: unknown): value is Map<Key, Value>;
153export declare function isNan(value: unknown): boolean;
154export declare function isNativePromise<T = unknown>(value: unknown): value is Promise<T>;
155export declare function isNegativeNumber(value: unknown): value is number;
156export declare function isNodeStream(value: unknown): value is NodeStream;
157export declare function isNonEmptyArray<T = unknown, Item = unknown>(value: T | Item[]): value is [Item, ...Item[]];
158export declare function isNonEmptyMap<Key = unknown, Value = unknown>(value: unknown): value is Map<Key, Value>;
159export declare function isNonEmptyObject<Key extends keyof any = string, Value = unknown>(value: unknown): value is Record<Key, Value>;
160export declare function isNonEmptySet<T = unknown>(value: unknown): value is Set<T>;
161export declare function isNonEmptyString(value: unknown): value is NonEmptyString;
162export declare function isNonEmptyStringAndNotWhitespace(value: unknown): value is NonEmptyString;
163export declare function isNull(value: unknown): value is null;
164export declare function isNullOrUndefined(value: unknown): value is null | undefined;
165export declare function isNumber(value: unknown): value is number;
166export declare function isNumericString(value: unknown): value is `${number}`;
167export declare function isObject(value: unknown): value is object;
168export declare function isObservable(value: unknown): value is ObservableLike;
169export declare function isOddInteger(value: unknown): value is number;
170export declare function isPlainObject<Value = unknown>(value: unknown): value is Record<PropertyKey, Value>;
171export declare function isPositiveNumber(value: unknown): value is number;
172export declare function isPrimitive(value: unknown): value is Primitive;
173export declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;
174export declare function isPropertyKey(value: unknown): value is PropertyKey;
175export declare function isRegExp(value: unknown): value is RegExp;
176export declare function isSafeInteger(value: unknown): value is number;
177export declare function isSet<T = unknown>(value: unknown): value is Set<T>;
178export declare function isSharedArrayBuffer(value: unknown): value is SharedArrayBuffer;
179export declare function isString(value: unknown): value is string;
180export declare function isSymbol(value: unknown): value is symbol;
181export declare function isTruthy<T>(value: T | Falsy): value is T;
182type TypeGuard<T> = (value: unknown) => value is T;
183type ResolveTypesOfTypeGuardsTuple<TypeGuardsOfT, ResultOfT extends unknown[] = []> = TypeGuardsOfT extends [TypeGuard<infer U>, ...infer TOthers] ? ResolveTypesOfTypeGuardsTuple<TOthers, [...ResultOfT, U]> : TypeGuardsOfT extends undefined[] ? ResultOfT : never;
184export declare function isTupleLike<T extends Array<TypeGuard<unknown>>>(value: unknown, guards: [...T]): value is ResolveTypesOfTypeGuardsTuple<T>;
185export declare function isTypedArray(value: unknown): value is TypedArray;
186export declare function isUint16Array(value: unknown): value is Uint16Array;
187export declare function isUint32Array(value: unknown): value is Uint32Array;
188export declare function isUint8Array(value: unknown): value is Uint8Array;
189export declare function isUint8ClampedArray(value: unknown): value is Uint8ClampedArray;
190export declare function isUndefined(value: unknown): value is undefined;
191export declare function isUrlInstance(value: unknown): value is URL;
192export declare function isUrlSearchParams(value: unknown): value is URLSearchParams;
193export declare function isUrlString(value: unknown): value is string;
194export declare function isValidDate(value: unknown): value is Date;
195export declare function isValidLength(value: unknown): value is number;
196export declare function isWeakMap<Key extends object = object, Value = unknown>(value: unknown): value is WeakMap<Key, Value>;
197export declare function isWeakRef(value: unknown): value is WeakRef<object>;
198export declare function isWeakSet(value: unknown): value is WeakSet<object>;
199export declare function isWhitespaceString(value: unknown): value is Whitespace;
200type Assert = {
201 undefined: (value: unknown, message?: string) => asserts value is undefined;
202 string: (value: unknown, message?: string) => asserts value is string;
203 number: (value: unknown, message?: string) => asserts value is number;
204 positiveNumber: (value: unknown, message?: string) => asserts value is number;
205 negativeNumber: (value: unknown, message?: string) => asserts value is number;
206 bigint: (value: unknown, message?: string) => asserts value is bigint;
207 function: (value: unknown, message?: string) => asserts value is Function;
208 null: (value: unknown, message?: string) => asserts value is null;
209 class: <T = unknown>(value: unknown, message?: string) => asserts value is Class<T>;
210 boolean: (value: unknown, message?: string) => asserts value is boolean;
211 symbol: (value: unknown, message?: string) => asserts value is symbol;
212 numericString: (value: unknown, message?: string) => asserts value is `${number}`;
213 array: <T = unknown>(value: unknown, assertion?: (element: unknown) => asserts element is T, message?: string) => asserts value is T[];
214 buffer: (value: unknown, message?: string) => asserts value is NodeBuffer;
215 blob: (value: unknown, message?: string) => asserts value is Blob;
216 nullOrUndefined: (value: unknown, message?: string) => asserts value is null | undefined;
217 object: <Key extends keyof any = string, Value = unknown>(value: unknown, message?: string) => asserts value is Record<Key, Value>;
218 iterable: <T = unknown>(value: unknown, message?: string) => asserts value is Iterable<T>;
219 asyncIterable: <T = unknown>(value: unknown, message?: string) => asserts value is AsyncIterable<T>;
220 generator: (value: unknown, message?: string) => asserts value is Generator;
221 asyncGenerator: (value: unknown, message?: string) => asserts value is AsyncGenerator;
222 nativePromise: <T = unknown>(value: unknown, message?: string) => asserts value is Promise<T>;
223 promise: <T = unknown>(value: unknown, message?: string) => asserts value is Promise<T>;
224 generatorFunction: (value: unknown, message?: string) => asserts value is GeneratorFunction;
225 asyncGeneratorFunction: (value: unknown, message?: string) => asserts value is AsyncGeneratorFunction;
226 asyncFunction: (value: unknown, message?: string) => asserts value is Function;
227 boundFunction: (value: unknown, message?: string) => asserts value is Function;
228 regExp: (value: unknown, message?: string) => asserts value is RegExp;
229 date: (value: unknown, message?: string) => asserts value is Date;
230 error: (value: unknown, message?: string) => asserts value is Error;
231 map: <Key = unknown, Value = unknown>(value: unknown, message?: string) => asserts value is Map<Key, Value>;
232 set: <T = unknown>(value: unknown, message?: string) => asserts value is Set<T>;
233 weakMap: <Key extends object = object, Value = unknown>(value: unknown, message?: string) => asserts value is WeakMap<Key, Value>;
234 weakSet: <T extends object = object>(value: unknown, message?: string) => asserts value is WeakSet<T>;
235 weakRef: <T extends object = object>(value: unknown, message?: string) => asserts value is WeakRef<T>;
236 int8Array: (value: unknown, message?: string) => asserts value is Int8Array;
237 uint8Array: (value: unknown, message?: string) => asserts value is Uint8Array;
238 uint8ClampedArray: (value: unknown, message?: string) => asserts value is Uint8ClampedArray;
239 int16Array: (value: unknown, message?: string) => asserts value is Int16Array;
240 uint16Array: (value: unknown, message?: string) => asserts value is Uint16Array;
241 int32Array: (value: unknown, message?: string) => asserts value is Int32Array;
242 uint32Array: (value: unknown, message?: string) => asserts value is Uint32Array;
243 float32Array: (value: unknown, message?: string) => asserts value is Float32Array;
244 float64Array: (value: unknown, message?: string) => asserts value is Float64Array;
245 bigInt64Array: (value: unknown, message?: string) => asserts value is BigInt64Array;
246 bigUint64Array: (value: unknown, message?: string) => asserts value is BigUint64Array;
247 arrayBuffer: (value: unknown, message?: string) => asserts value is ArrayBuffer;
248 sharedArrayBuffer: (value: unknown, message?: string) => asserts value is SharedArrayBuffer;
249 dataView: (value: unknown, message?: string) => asserts value is DataView;
250 enumCase: <T = unknown>(value: unknown, targetEnum: T, message?: string) => asserts value is T[keyof T];
251 urlInstance: (value: unknown, message?: string) => asserts value is URL;
252 urlString: (value: unknown, message?: string) => asserts value is string;
253 truthy: <T>(value: T | Falsy, message?: string) => asserts value is T;
254 falsy: (value: unknown, message?: string) => asserts value is Falsy;
255 nan: (value: unknown, message?: string) => asserts value is number;
256 primitive: (value: unknown, message?: string) => asserts value is Primitive;
257 integer: (value: unknown, message?: string) => asserts value is number;
258 safeInteger: (value: unknown, message?: string) => asserts value is number;
259 plainObject: <Value = unknown>(value: unknown, message?: string) => asserts value is Record<PropertyKey, Value>;
260 typedArray: (value: unknown, message?: string) => asserts value is TypedArray;
261 arrayLike: <T = unknown>(value: unknown, message?: string) => asserts value is ArrayLike<T>;
262 tupleLike: <T extends Array<TypeGuard<unknown>>>(value: unknown, guards: [...T], message?: string) => asserts value is ResolveTypesOfTypeGuardsTuple<T>;
263 htmlElement: (value: unknown, message?: string) => asserts value is HTMLElement;
264 observable: (value: unknown, message?: string) => asserts value is ObservableLike;
265 nodeStream: (value: unknown, message?: string) => asserts value is NodeStream;
266 infinite: (value: unknown, message?: string) => asserts value is number;
267 emptyArray: (value: unknown, message?: string) => asserts value is never[];
268 nonEmptyArray: <T = unknown, Item = unknown>(value: T | Item[], message?: string) => asserts value is [Item, ...Item[]];
269 emptyString: (value: unknown, message?: string) => asserts value is '';
270 emptyStringOrWhitespace: (value: unknown, message?: string) => asserts value is '' | Whitespace;
271 nonEmptyString: (value: unknown, message?: string) => asserts value is string;
272 nonEmptyStringAndNotWhitespace: (value: unknown, message?: string) => asserts value is string;
273 emptyObject: <Key extends keyof any = string>(value: unknown, message?: string) => asserts value is Record<Key, never>;
274 nonEmptyObject: <Key extends keyof any = string, Value = unknown>(value: unknown, message?: string) => asserts value is Record<Key, Value>;
275 emptySet: (value: unknown, message?: string) => asserts value is Set<never>;
276 nonEmptySet: <T = unknown>(value: unknown, message?: string) => asserts value is Set<T>;
277 emptyMap: (value: unknown, message?: string) => asserts value is Map<never, never>;
278 nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown, message?: string) => asserts value is Map<Key, Value>;
279 propertyKey: (value: unknown, message?: string) => asserts value is PropertyKey;
280 formData: (value: unknown, message?: string) => asserts value is FormData;
281 urlSearchParams: (value: unknown, message?: string) => asserts value is URLSearchParams;
282 validDate: (value: unknown, message?: string) => asserts value is Date;
283 validLength: (value: unknown, message?: string) => asserts value is number;
284 whitespaceString: (value: unknown, message?: string) => asserts value is string;
285 evenInteger: (value: number, message?: string) => asserts value is number;
286 oddInteger: (value: number, message?: string) => asserts value is number;
287 directInstanceOf: <T>(instance: unknown, class_: Class<T>, message?: string) => asserts instance is T;
288 inRange: (value: number, range: number | [number, number], message?: string) => asserts value is number;
289 any: (predicate: Predicate | Predicate[], ...values: unknown[]) => void | never;
290 all: (predicate: Predicate, ...values: unknown[]) => void | never;
291};
292export declare const assert: Assert;
293export declare function assertAll(predicate: Predicate, ...values: unknown[]): void | never;
294export declare function assertAny(predicate: Predicate | Predicate[], ...values: unknown[]): void | never;
295export declare function assertArray<T = unknown>(value: unknown, assertion?: (element: unknown, message?: string) => asserts element is T, message?: string): asserts value is T[];
296export declare function assertArrayBuffer(value: unknown, message?: string): asserts value is ArrayBuffer;
297export declare function assertArrayLike<T = unknown>(value: unknown, message?: string): asserts value is ArrayLike<T>;
298export declare function assertAsyncFunction(value: unknown, message?: string): asserts value is Function;
299export declare function assertAsyncGenerator(value: unknown, message?: string): asserts value is AsyncGenerator;
300export declare function assertAsyncGeneratorFunction(value: unknown, message?: string): asserts value is AsyncGeneratorFunction;
301export declare function assertAsyncIterable<T = unknown>(value: unknown, message?: string): asserts value is AsyncIterable<T>;
302export declare function assertBigint(value: unknown, message?: string): asserts value is bigint;
303export declare function assertBigInt64Array(value: unknown, message?: string): asserts value is BigInt64Array;
304export declare function assertBigUint64Array(value: unknown, message?: string): asserts value is BigUint64Array;
305export declare function assertBlob(value: unknown, message?: string): asserts value is Blob;
306export declare function assertBoolean(value: unknown, message?: string): asserts value is boolean;
307export declare function assertBoundFunction(value: unknown, message?: string): asserts value is Function;
308/**
309Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer)
310*/
311export declare function assertBuffer(value: unknown, message?: string): asserts value is NodeBuffer;
312export declare function assertClass<T>(value: unknown, message?: string): asserts value is Class<T>;
313export declare function assertDataView(value: unknown, message?: string): asserts value is DataView;
314export declare function assertDate(value: unknown, message?: string): asserts value is Date;
315export declare function assertDirectInstanceOf<T>(instance: unknown, class_: Class<T>, message?: string): asserts instance is T;
316export declare function assertEmptyArray(value: unknown, message?: string): asserts value is never[];
317export declare function assertEmptyMap(value: unknown, message?: string): asserts value is Map<never, never>;
318export declare function assertEmptyObject<Key extends keyof any = string>(value: unknown, message?: string): asserts value is Record<Key, never>;
319export declare function assertEmptySet(value: unknown, message?: string): asserts value is Set<never>;
320export declare function assertEmptyString(value: unknown, message?: string): asserts value is '';
321export declare function assertEmptyStringOrWhitespace(value: unknown, message?: string): asserts value is '' | Whitespace;
322export declare function assertEnumCase<T = unknown>(value: unknown, targetEnum: T, message?: string): asserts value is T[keyof T];
323export declare function assertError(value: unknown, message?: string): asserts value is Error;
324export declare function assertEvenInteger(value: number, message?: string): asserts value is number;
325export declare function assertFalsy(value: unknown, message?: string): asserts value is Falsy;
326export declare function assertFloat32Array(value: unknown, message?: string): asserts value is Float32Array;
327export declare function assertFloat64Array(value: unknown, message?: string): asserts value is Float64Array;
328export declare function assertFormData(value: unknown, message?: string): asserts value is FormData;
329export declare function assertFunction(value: unknown, message?: string): asserts value is Function;
330export declare function assertGenerator(value: unknown, message?: string): asserts value is Generator;
331export declare function assertGeneratorFunction(value: unknown, message?: string): asserts value is GeneratorFunction;
332export declare function assertHtmlElement(value: unknown, message?: string): asserts value is HTMLElement;
333export declare function assertInfinite(value: unknown, message?: string): asserts value is number;
334export declare function assertInRange(value: number, range: number | [number, number], message?: string): asserts value is number;
335export declare function assertInt16Array(value: unknown, message?: string): asserts value is Int16Array;
336export declare function assertInt32Array(value: unknown, message?: string): asserts value is Int32Array;
337export declare function assertInt8Array(value: unknown, message?: string): asserts value is Int8Array;
338export declare function assertInteger(value: unknown, message?: string): asserts value is number;
339export declare function assertIterable<T = unknown>(value: unknown, message?: string): asserts value is Iterable<T>;
340export declare function assertMap<Key = unknown, Value = unknown>(value: unknown, message?: string): asserts value is Map<Key, Value>;
341export declare function assertNan(value: unknown, message?: string): asserts value is number;
342export declare function assertNativePromise<T = unknown>(value: unknown, message?: string): asserts value is Promise<T>;
343export declare function assertNegativeNumber(value: unknown, message?: string): asserts value is number;
344export declare function assertNodeStream(value: unknown, message?: string): asserts value is NodeStream;
345export declare function assertNonEmptyArray<T = unknown, Item = unknown>(value: T | Item[], message?: string): asserts value is [Item, ...Item[]];
346export declare function assertNonEmptyMap<Key = unknown, Value = unknown>(value: unknown, message?: string): asserts value is Map<Key, Value>;
347export declare function assertNonEmptyObject<Key extends keyof any = string, Value = unknown>(value: unknown, message?: string): asserts value is Record<Key, Value>;
348export declare function assertNonEmptySet<T = unknown>(value: unknown, message?: string): asserts value is Set<T>;
349export declare function assertNonEmptyString(value: unknown, message?: string): asserts value is string;
350export declare function assertNonEmptyStringAndNotWhitespace(value: unknown, message?: string): asserts value is string;
351export declare function assertNull(value: unknown, message?: string): asserts value is null;
352export declare function assertNullOrUndefined(value: unknown, message?: string): asserts value is null | undefined;
353export declare function assertNumber(value: unknown, message?: string): asserts value is number;
354export declare function assertNumericString(value: unknown, message?: string): asserts value is `${number}`;
355export declare function assertObject(value: unknown, message?: string): asserts value is object;
356export declare function assertObservable(value: unknown, message?: string): asserts value is ObservableLike;
357export declare function assertOddInteger(value: number, message?: string): asserts value is number;
358export declare function assertPlainObject<Value = unknown>(value: unknown, message?: string): asserts value is Record<PropertyKey, Value>;
359export declare function assertPositiveNumber(value: unknown, message?: string): asserts value is number;
360export declare function assertPrimitive(value: unknown, message?: string): asserts value is Primitive;
361export declare function assertPromise<T = unknown>(value: unknown, message?: string): asserts value is Promise<T>;
362export declare function assertPropertyKey(value: unknown, message?: string): asserts value is number;
363export declare function assertRegExp(value: unknown, message?: string): asserts value is RegExp;
364export declare function assertSafeInteger(value: unknown, message?: string): asserts value is number;
365export declare function assertSet<T = unknown>(value: unknown, message?: string): asserts value is Set<T>;
366export declare function assertSharedArrayBuffer(value: unknown, message?: string): asserts value is SharedArrayBuffer;
367export declare function assertString(value: unknown, message?: string): asserts value is string;
368export declare function assertSymbol(value: unknown, message?: string): asserts value is symbol;
369export declare function assertTruthy<T>(value: T | Falsy, message?: string): asserts value is T;
370export declare function assertTupleLike<T extends Array<TypeGuard<unknown>>>(value: unknown, guards: [...T], message?: string): asserts value is ResolveTypesOfTypeGuardsTuple<T>;
371export declare function assertTypedArray(value: unknown, message?: string): asserts value is TypedArray;
372export declare function assertUint16Array(value: unknown, message?: string): asserts value is Uint16Array;
373export declare function assertUint32Array(value: unknown, message?: string): asserts value is Uint32Array;
374export declare function assertUint8Array(value: unknown, message?: string): asserts value is Uint8Array;
375export declare function assertUint8ClampedArray(value: unknown, message?: string): asserts value is Uint8ClampedArray;
376export declare function assertUndefined(value: unknown, message?: string): asserts value is undefined;
377export declare function assertUrlInstance(value: unknown, message?: string): asserts value is URL;
378export declare function assertUrlSearchParams(value: unknown, message?: string): asserts value is URLSearchParams;
379export declare function assertUrlString(value: unknown, message?: string): asserts value is string;
380export declare function assertValidDate(value: unknown, message?: string): asserts value is Date;
381export declare function assertValidLength(value: unknown, message?: string): asserts value is number;
382export declare function assertWeakMap<Key extends object = object, Value = unknown>(value: unknown, message?: string): asserts value is WeakMap<Key, Value>;
383export declare function assertWeakRef<T extends object = object>(value: unknown, message?: string): asserts value is WeakRef<T>;
384export declare function assertWeakSet<T extends object = object>(value: unknown, message?: string): asserts value is WeakSet<T>;
385export declare function assertWhitespaceString(value: unknown, message?: string): asserts value is string;
386export default is;
387export type { ArrayLike, Class, NodeStream, ObservableLike, Predicate, Primitive, TypedArray, } from './types.js';
388
\No newline at end of file