is-what 4.1.15 → 4.1.16

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,334 +1,380 @@
1
- type AnyFunction = (...args: any[]) => any;
2
- type AnyAsyncFunction = (...args: any[]) => Promise<any>;
3
- type AnyClass = new (...args: any[]) => any;
4
- type PlainObject = Record<string | number | symbol, any>;
5
- type TypeGuard<A, B extends A> = (payload: A) => payload is B;
6
1
  /**
7
2
  * Returns the object type of the given payload
8
3
  *
9
- * @param {*} payload
4
+ * @param {any} payload
10
5
  * @returns {string}
11
6
  */
12
7
  declare function getType(payload: any): string;
8
+
9
+ type PlainObject = Record<string | number | symbol, any>;
13
10
  /**
14
- * Returns whether the payload is undefined
11
+ * Returns whether the payload is a plain JavaScript object (excluding special classes or objects
12
+ * with other prototypes)
15
13
  *
16
- * @param {*} payload
17
- * @returns {payload is undefined}
14
+ * @param {any} payload
15
+ * @returns {payload is PlainObject}
18
16
  */
19
- declare function isUndefined(payload: any): payload is undefined;
17
+ declare function isPlainObject(payload: any): payload is PlainObject;
18
+
20
19
  /**
21
- * Returns whether the payload is null
20
+ * Returns whether the payload is an any kind of object (including special classes or objects with
21
+ * different prototypes)
22
22
  *
23
- * @param {*} payload
24
- * @returns {payload is null}
23
+ * @param {any} payload
24
+ * @returns {payload is PlainObject}
25
25
  */
26
- declare function isNull(payload: any): payload is null;
26
+ declare function isAnyObject(payload: any): payload is PlainObject;
27
+
27
28
  /**
28
- * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
29
+ * Returns whether the payload is an array
29
30
  *
30
- * @param {*} payload
31
- * @returns {payload is PlainObject}
31
+ * @param {any} payload
32
+ * @returns {payload is any[]}
32
33
  */
33
- declare function isPlainObject(payload: any): payload is PlainObject;
34
+ declare function isArray(payload: any): payload is any[];
35
+
34
36
  /**
35
- * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
37
+ * Returns whether the payload is a Blob
36
38
  *
37
- * @param {*} payload
38
- * @returns {payload is PlainObject}
39
+ * @param {any} payload
40
+ * @returns {payload is Blob}
39
41
  */
40
- declare function isObject(payload: any): payload is PlainObject;
42
+ declare function isBlob(payload: any): payload is Blob;
43
+
41
44
  /**
42
- * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
45
+ * Returns whether the payload is a boolean
43
46
  *
44
- * @param {*} payload
45
- * @returns {payload is { [K in any]: never }}
47
+ * @param {any} payload
48
+ * @returns {payload is boolean}
46
49
  */
47
- declare function isEmptyObject(payload: any): payload is {
48
- [K in any]: never;
49
- };
50
+ declare function isBoolean(payload: any): payload is boolean;
51
+
50
52
  /**
51
- * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
53
+ * Returns whether the payload is a Date, and that the date is valid
52
54
  *
53
- * @param {*} payload
54
- * @returns {payload is PlainObject}
55
+ * @param {any} payload
56
+ * @returns {payload is Date}
55
57
  */
56
- declare function isFullObject(payload: any): payload is PlainObject;
58
+ declare function isDate(payload: any): payload is Date;
59
+
57
60
  /**
58
- * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
61
+ * Returns whether the payload is a an empty array
59
62
  *
60
- * @param {*} payload
61
- * @returns {payload is PlainObject}
63
+ * @param {any} payload
64
+ * @returns {payload is []}
62
65
  */
63
- declare function isAnyObject(payload: any): payload is PlainObject;
66
+ declare function isEmptyArray(payload: any): payload is [];
67
+
64
68
  /**
65
- * Returns whether the payload is an object like a type passed in < >
69
+ * Returns whether the payload is a an empty object (excluding special classes or objects with other
70
+ * prototypes)
66
71
  *
67
- * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
72
+ * @param {any} payload
73
+ * @returns {payload is { [K in any]: never }}
74
+ */
75
+ declare function isEmptyObject(payload: any): payload is {
76
+ [K in any]: never;
77
+ };
78
+
79
+ /**
80
+ * Returns whether the payload is ''
68
81
  *
69
- * @template T this must be passed in < >
70
- * @param {*} payload
71
- * @returns {payload is T}
82
+ * @param {any} payload
83
+ * @returns {payload is string}
72
84
  */
73
- declare function isObjectLike<T extends PlainObject>(payload: any): payload is T;
85
+ declare function isEmptyString(payload: any): payload is string;
86
+
74
87
  /**
75
- * Returns whether the payload is a function (regular or async)
88
+ * Returns whether the payload is an Error
76
89
  *
77
- * @param {*} payload
78
- * @returns {payload is AnyFunction}
90
+ * @param {any} payload
91
+ * @returns {payload is Error}
79
92
  */
80
- declare function isFunction(payload: any): payload is AnyFunction;
93
+ declare function isError(payload: any): payload is Error;
94
+
81
95
  /**
82
- * Returns whether the payload is an array
96
+ * Returns whether the payload is a File
83
97
  *
84
98
  * @param {any} payload
85
- * @returns {payload is any[]}
99
+ * @returns {payload is File}
86
100
  */
87
- declare function isArray(payload: any): payload is any[];
101
+ declare function isFile(payload: any): payload is File;
102
+
88
103
  /**
89
104
  * Returns whether the payload is a an array with at least 1 item
90
105
  *
91
- * @param {*} payload
106
+ * @param {any} payload
92
107
  * @returns {payload is any[]}
93
108
  */
94
109
  declare function isFullArray(payload: any): payload is any[];
110
+
95
111
  /**
96
- * Returns whether the payload is a an empty array
112
+ * Returns whether the payload is a an empty object (excluding special classes or objects with other
113
+ * prototypes)
97
114
  *
98
- * @param {*} payload
99
- * @returns {payload is []}
115
+ * @param {any} payload
116
+ * @returns {payload is PlainObject}
100
117
  */
101
- declare function isEmptyArray(payload: any): payload is [];
118
+ declare function isFullObject(payload: any): payload is PlainObject;
119
+
102
120
  /**
103
- * Returns whether the payload is a string
121
+ * Returns whether the payload is a string, BUT returns false for ''
104
122
  *
105
- * @param {*} payload
123
+ * @param {any} payload
106
124
  * @returns {payload is string}
107
125
  */
108
- declare function isString(payload: any): payload is string;
126
+ declare function isFullString(payload: any): payload is string;
127
+
128
+ type AnyFunction = (...args: any[]) => any;
109
129
  /**
110
- * Returns whether the payload is a string, BUT returns false for ''
130
+ * Returns whether the payload is a function (regular or async)
111
131
  *
112
- * @param {*} payload
113
- * @returns {payload is string}
132
+ * @param {any} payload
133
+ * @returns {payload is AnyFunction}
114
134
  */
115
- declare function isFullString(payload: any): payload is string;
135
+ declare function isFunction(payload: any): payload is AnyFunction;
136
+
137
+ type AnyClass = new (...args: any[]) => any;
116
138
  /**
117
- * Returns whether the payload is ''
139
+ * Does a generic check to check that the given payload is of a given type. In cases like Number, it
140
+ * will return true for NaN as NaN is a Number (thanks javascript!); It will, however, differentiate
141
+ * between object and null
118
142
  *
119
- * @param {*} payload
120
- * @returns {payload is string}
143
+ * @template T
144
+ * @param {any} payload
145
+ * @param {T} type
146
+ * @returns {payload is T}
147
+ * @throws {TypeError} Will throw type error if type is an invalid type
121
148
  */
122
- declare function isEmptyString(payload: any): payload is string;
149
+ declare function isType<T extends AnyFunction | AnyClass>(payload: any, type: T): payload is T;
150
+
151
+ type GlobalClassName = {
152
+ [K in keyof typeof globalThis]: (typeof globalThis)[K] extends AnyClass ? K : never;
153
+ }[keyof typeof globalThis];
123
154
  /**
124
- * Returns whether the payload is a number (but not NaN)
155
+ * Checks if a value is an instance of a class or a class name. Useful when you want to check if a
156
+ * value is an instance of a class that may not be defined in the current scope. For example, if you
157
+ * want to check if a value is an `OffscreenCanvas` instance, you might not want to do the song and
158
+ * dance of using `typeof OffscreenCanvas !== 'undefined'` and then shimming `OffscreenCanvas` if
159
+ * the types aren't around.
125
160
  *
126
- * This will return `false` for `NaN`!!
161
+ * @example
162
+ * if (isInstanceOf(value, 'OffscreenCanvas')) {
163
+ * // value is an OffscreenCanvas
164
+ * }
127
165
  *
128
- * @param {*} payload
129
- * @returns {payload is number}
166
+ * @param value The value to recursively check
167
+ * @param class_ A string or class that the value should be an instance of
130
168
  */
131
- declare function isNumber(payload: any): payload is number;
169
+ declare function isInstanceOf<T extends AnyClass>(value: unknown, class_: T): value is T;
170
+ declare function isInstanceOf<K extends GlobalClassName>(value: unknown, className: K): value is (typeof globalThis)[K];
171
+ declare function isInstanceOf(value: unknown, className: string): value is object;
172
+
132
173
  /**
133
- * Returns whether the payload is a positive number (but not 0)
174
+ * Returns whether the payload is a Map
134
175
  *
135
- * @param {*} payload
136
- * @returns {payload is number}
176
+ * @param {any} payload
177
+ * @returns {payload is Map<any, any>}
137
178
  */
138
- declare function isPositiveNumber(payload: any): payload is number;
179
+ declare function isMap(payload: any): payload is Map<any, any>;
180
+
181
+ /**
182
+ * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
183
+ *
184
+ * @param {any} payload
185
+ * @returns {payload is typeof NaN}
186
+ */
187
+ declare function isNaNValue(payload: any): payload is typeof NaN;
188
+
139
189
  /**
140
190
  * Returns whether the payload is a negative number (but not 0)
141
191
  *
142
- * @param {*} payload
192
+ * @param {any} payload
143
193
  * @returns {payload is number}
144
194
  */
145
195
  declare function isNegativeNumber(payload: any): payload is number;
196
+
146
197
  /**
147
- * Returns whether the payload is a boolean
198
+ * Returns whether the payload is null
148
199
  *
149
- * @param {*} payload
150
- * @returns {payload is boolean}
200
+ * @param {any} payload
201
+ * @returns {payload is null}
151
202
  */
152
- declare function isBoolean(payload: any): payload is boolean;
203
+ declare function isNull(payload: any): payload is null;
204
+
153
205
  /**
154
- * Returns whether the payload is a regular expression (RegExp)
206
+ * Returns true whether the payload is null or undefined
155
207
  *
156
- * @param {*} payload
157
- * @returns {payload is RegExp}
208
+ * @param {any} payload
209
+ * @returns {(payload is null | undefined)}
158
210
  */
159
- declare function isRegExp(payload: any): payload is RegExp;
211
+ declare const isNullOrUndefined: (payload: any) => payload is null | undefined;
212
+
160
213
  /**
161
- * Returns whether the payload is a Map
214
+ * Returns whether the payload is a number (but not NaN)
162
215
  *
163
- * @param {*} payload
164
- * @returns {payload is Map<any, any>}
165
- */
166
- declare function isMap(payload: any): payload is Map<any, any>;
167
- /**
168
- * Returns whether the payload is a WeakMap
216
+ * This will return `false` for `NaN`!!
169
217
  *
170
- * @param {*} payload
171
- * @returns {payload is WeakMap<any, any>}
218
+ * @param {any} payload
219
+ * @returns {payload is number}
172
220
  */
173
- declare function isWeakMap(payload: any): payload is WeakMap<any, any>;
221
+ declare function isNumber(payload: any): payload is number;
222
+
174
223
  /**
175
- * Returns whether the payload is a Set
224
+ * Returns whether the payload is a plain JavaScript object (excluding special classes or objects
225
+ * with other prototypes)
176
226
  *
177
- * @param {*} payload
178
- * @returns {payload is Set<any>}
227
+ * @param {any} payload
228
+ * @returns {payload is PlainObject}
179
229
  */
180
- declare function isSet(payload: any): payload is Set<any>;
230
+ declare function isObject(payload: any): payload is PlainObject;
231
+
181
232
  /**
182
- * Returns whether the payload is a WeakSet
233
+ * Returns whether the payload is an object like a type passed in < >
183
234
  *
184
- * @param {*} payload
185
- * @returns {payload is WeakSet<any>}
186
- */
187
- declare function isWeakSet(payload: any): payload is WeakSet<any>;
188
- /**
189
- * Returns whether the payload is a Symbol
235
+ * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
190
236
  *
191
- * @param {*} payload
192
- * @returns {payload is symbol}
237
+ * @template T This must be passed in < >
238
+ * @param {any} payload
239
+ * @returns {payload is T}
193
240
  */
194
- declare function isSymbol(payload: any): payload is symbol;
241
+ declare function isObjectLike<T extends PlainObject>(payload: any): payload is T;
242
+
243
+ type TypeGuard<A, B extends A> = (payload: A) => payload is B;
195
244
  /**
196
- * Returns whether the payload is a Date, and that the date is valid
245
+ * A factory function that creates a function to check if the payload is one of the given types.
197
246
  *
198
- * @param {*} payload
199
- * @returns {payload is Date}
200
- */
201
- declare function isDate(payload: any): payload is Date;
202
- /**
203
- * Returns whether the payload is a Blob
247
+ * @example
248
+ * import { isOneOf, isNull, isUndefined } from 'is-what'
204
249
  *
205
- * @param {*} payload
206
- * @returns {payload is Blob}
250
+ * const isNullOrUndefined = isOneOf(isNull, isUndefined)
251
+ *
252
+ * isNullOrUndefined(null) // true
253
+ * isNullOrUndefined(undefined) // true
254
+ * isNullOrUndefined(123) // false
207
255
  */
208
- declare function isBlob(payload: any): payload is Blob;
256
+ declare function isOneOf<A, B extends A, C extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>): TypeGuard<A, B | C>;
209
257
  /**
210
- * Returns whether the payload is a File
258
+ * A factory function that creates a function to check if the payload is one of the given types.
211
259
  *
212
- * @param {*} payload
213
- * @returns {payload is File}
260
+ * @example
261
+ * import { isOneOf, isNull, isUndefined } from 'is-what'
262
+ *
263
+ * const isNullOrUndefined = isOneOf(isNull, isUndefined)
264
+ *
265
+ * isNullOrUndefined(null) // true
266
+ * isNullOrUndefined(undefined) // true
267
+ * isNullOrUndefined(123) // false
214
268
  */
215
- declare function isFile(payload: any): payload is File;
269
+ declare function isOneOf<A, B extends A, C extends A, D extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>): TypeGuard<A, B | C | D>;
216
270
  /**
217
- * Returns whether the payload is a Promise
271
+ * A factory function that creates a function to check if the payload is one of the given types.
218
272
  *
219
- * @param {*} payload
220
- * @returns {payload is Promise<any>}
273
+ * @example
274
+ * import { isOneOf, isNull, isUndefined } from 'is-what'
275
+ *
276
+ * const isNullOrUndefined = isOneOf(isNull, isUndefined)
277
+ *
278
+ * isNullOrUndefined(null) // true
279
+ * isNullOrUndefined(undefined) // true
280
+ * isNullOrUndefined(123) // false
221
281
  */
222
- declare function isPromise(payload: any): payload is Promise<any>;
282
+ declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>): TypeGuard<A, B | C | D | E>;
223
283
  /**
224
- * Returns whether the payload is an Error
284
+ * A factory function that creates a function to check if the payload is one of the given types.
225
285
  *
226
- * @param {*} payload
227
- * @returns {payload is Error}
286
+ * @example
287
+ * import { isOneOf, isNull, isUndefined } from 'is-what'
288
+ *
289
+ * const isNullOrUndefined = isOneOf(isNull, isUndefined)
290
+ *
291
+ * isNullOrUndefined(null) // true
292
+ * isNullOrUndefined(undefined) // true
293
+ * isNullOrUndefined(123) // false
228
294
  */
229
- declare function isError(payload: any): payload is Error;
295
+ declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A, F extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>, e: TypeGuard<A, F>): TypeGuard<A, B | C | D | E | F>;
296
+
230
297
  /**
231
- * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
298
+ * Returns whether the payload is a positive number (but not 0)
232
299
  *
233
- * @param {*} payload
234
- * @returns {payload is typeof NaN}
300
+ * @param {any} payload
301
+ * @returns {payload is number}
235
302
  */
236
- declare function isNaNValue(payload: any): payload is typeof NaN;
303
+ declare function isPositiveNumber(payload: any): payload is number;
304
+
237
305
  /**
238
- * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
306
+ * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String
307
+ * | Symbol)
239
308
  *
240
- * @param {*} payload
309
+ * @param {any} payload
241
310
  * @returns {(payload is boolean | null | undefined | number | string | symbol)}
242
311
  */
243
312
  declare function isPrimitive(payload: any): payload is boolean | null | undefined | number | string | symbol;
313
+
244
314
  /**
245
- * Returns true whether the payload is null or undefined
315
+ * Returns whether the payload is a Promise
246
316
  *
247
- * @param {*} payload
248
- * @returns {(payload is null | undefined)}
317
+ * @param {any} payload
318
+ * @returns {payload is Promise<any>}
249
319
  */
250
- declare const isNullOrUndefined: TypeGuard<any, null | undefined>;
320
+ declare function isPromise(payload: any): payload is Promise<any>;
321
+
251
322
  /**
252
- * A factory function that creates a function to check if the payload is one of the given types.
253
- * @example
254
- * import { isOneOf, isNull, isUndefined } from 'is-what'
255
- *
256
- * const isNullOrUndefined = isOneOf(isNull, isUndefined)
323
+ * Returns whether the payload is a regular expression (RegExp)
257
324
  *
258
- * isNullOrUndefined(null) // true
259
- * isNullOrUndefined(undefined) // true
260
- * isNullOrUndefined(123) // false
325
+ * @param {any} payload
326
+ * @returns {payload is RegExp}
261
327
  */
262
- declare function isOneOf<A, B extends A, C extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>): TypeGuard<A, B | C>;
328
+ declare function isRegExp(payload: any): payload is RegExp;
329
+
263
330
  /**
264
- * A factory function that creates a function to check if the payload is one of the given types.
265
- * @example
266
- * import { isOneOf, isNull, isUndefined } from 'is-what'
267
- *
268
- * const isNullOrUndefined = isOneOf(isNull, isUndefined)
331
+ * Returns whether the payload is a Set
269
332
  *
270
- * isNullOrUndefined(null) // true
271
- * isNullOrUndefined(undefined) // true
272
- * isNullOrUndefined(123) // false
333
+ * @param {any} payload
334
+ * @returns {payload is Set<any>}
273
335
  */
274
- declare function isOneOf<A, B extends A, C extends A, D extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>): TypeGuard<A, B | C | D>;
336
+ declare function isSet(payload: any): payload is Set<any>;
337
+
275
338
  /**
276
- * A factory function that creates a function to check if the payload is one of the given types.
277
- * @example
278
- * import { isOneOf, isNull, isUndefined } from 'is-what'
279
- *
280
- * const isNullOrUndefined = isOneOf(isNull, isUndefined)
339
+ * Returns whether the payload is a string
281
340
  *
282
- * isNullOrUndefined(null) // true
283
- * isNullOrUndefined(undefined) // true
284
- * isNullOrUndefined(123) // false
341
+ * @param {any} payload
342
+ * @returns {payload is string}
285
343
  */
286
- declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>): TypeGuard<A, B | C | D | E>;
344
+ declare function isString(payload: any): payload is string;
345
+
287
346
  /**
288
- * A factory function that creates a function to check if the payload is one of the given types.
289
- * @example
290
- * import { isOneOf, isNull, isUndefined } from 'is-what'
291
- *
292
- * const isNullOrUndefined = isOneOf(isNull, isUndefined)
347
+ * Returns whether the payload is a Symbol
293
348
  *
294
- * isNullOrUndefined(null) // true
295
- * isNullOrUndefined(undefined) // true
296
- * isNullOrUndefined(123) // false
349
+ * @param {any} payload
350
+ * @returns {payload is symbol}
297
351
  */
298
- declare function isOneOf<A, B extends A, C extends A, D extends A, E extends A, F extends A>(a: TypeGuard<A, B>, b: TypeGuard<A, C>, c: TypeGuard<A, D>, d: TypeGuard<A, E>, e: TypeGuard<A, F>): TypeGuard<A, B | C | D | E | F>;
352
+ declare function isSymbol(payload: any): payload is symbol;
353
+
299
354
  /**
300
- * Does a generic check to check that the given payload is of a given type.
301
- * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
302
- * It will, however, differentiate between object and null
355
+ * Returns whether the payload is undefined
303
356
  *
304
- * @template T
305
- * @param {*} payload
306
- * @param {T} type
307
- * @throws {TypeError} Will throw type error if type is an invalid type
308
- * @returns {payload is T}
357
+ * @param {any} payload
358
+ * @returns {payload is undefined}
309
359
  */
310
- declare function isType<T extends AnyFunction | AnyClass>(payload: any, type: T): payload is T;
311
- type GlobalClassName = {
312
- [K in keyof typeof globalThis]: (typeof globalThis)[K] extends AnyClass ? K : never;
313
- }[keyof typeof globalThis];
360
+ declare function isUndefined(payload: any): payload is undefined;
361
+
314
362
  /**
315
- * Checks if a value is an instance of a class or a class name. Useful when you
316
- * want to check if a value is an instance of a class that may not be defined in
317
- * the current scope. For example, if you want to check if a value is an
318
- * `OffscreenCanvas` instance, you might not want to do the song and dance of
319
- * using `typeof OffscreenCanvas !== 'undefined'` and then shimming
320
- * `OffscreenCanvas` if the types aren't around.
363
+ * Returns whether the payload is a WeakMap
321
364
  *
322
- * @example
323
- * if (isInstanceOf(value, 'OffscreenCanvas')) {
324
- * // value is an OffscreenCanvas
325
- * }
365
+ * @param {any} payload
366
+ * @returns {payload is WeakMap<any, any>}
367
+ */
368
+ declare function isWeakMap(payload: any): payload is WeakMap<any, any>;
369
+
370
+ /**
371
+ * Returns whether the payload is a WeakSet
326
372
  *
327
- * @param value The value to recursively check
328
- * @param class_ A string or class that the value should be an instance of
373
+ * @param {any} payload
374
+ * @returns {payload is WeakSet<any>}
329
375
  */
330
- declare function isInstanceOf<T extends AnyClass>(value: unknown, class_: T): value is T;
331
- declare function isInstanceOf<K extends GlobalClassName>(value: unknown, className: K): value is (typeof globalThis)[K];
332
- declare function isInstanceOf(value: unknown, className: string): value is object;
376
+ declare function isWeakSet(payload: any): payload is WeakSet<any>;
377
+
378
+ type AnyAsyncFunction = (...args: any[]) => Promise<any>;
333
379
 
334
380
  export { AnyAsyncFunction, AnyClass, AnyFunction, PlainObject, getType, isAnyObject, isArray, isBlob, isBoolean, isDate, isEmptyArray, isEmptyObject, isEmptyString, isError, isFile, isFullArray, isFullObject, isFullString, isFunction, isInstanceOf, isMap, isNaNValue, isNegativeNumber, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isOneOf, isPlainObject, isPositiveNumber, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isType, isUndefined, isWeakMap, isWeakSet };