@xylabs/typeof 5.0.83 → 5.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
  Base functionality used throughout XY Labs TypeScript/JavaScript libraries
17
17
 
18
+
19
+
18
20
  ## Reference
19
21
 
20
22
  **@xylabs/typeof**
@@ -23,64 +25,68 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
23
25
 
24
26
  ## Type Aliases
25
27
 
26
- - [Brand](#type-aliases/Brand)
27
- - [IdentityFunction](#type-aliases/IdentityFunction)
28
- - [FieldType](#type-aliases/FieldType)
29
- - [ObjectTypeShape](#type-aliases/ObjectTypeShape)
30
- - [TypeOfTypes](#type-aliases/TypeOfTypes)
31
- - [TypedValue](#type-aliases/TypedValue)
32
- - [TypedKey](#type-aliases/TypedKey)
33
- - [TypedObject](#type-aliases/TypedObject)
34
- - [TypedArray](#type-aliases/TypedArray)
35
- - [AnyFunction](#type-aliases/AnyFunction)
36
- - [RecordKey](#type-aliases/RecordKey)
28
+ | Type Alias | Description |
29
+ | ------ | ------ |
30
+ | [Brand](#type-aliases/Brand) | Creates a branded type by intersecting base type T with brand type B, enabling nominal typing in TypeScript. |
31
+ | [IdentityFunction](#type-aliases/IdentityFunction) | A type guard function that narrows an unknown value to type T. |
32
+ | [FieldType](#type-aliases/FieldType) | Union of string literals representing the possible types of an object field. |
33
+ | [ObjectTypeShape](#type-aliases/ObjectTypeShape) | Describes the expected shape of an object by mapping each key to its expected field type. |
34
+ | [TypeOfTypes](#type-aliases/TypeOfTypes) | Union of string literals representing the possible results of the extended `typeOf` function. |
35
+ | [TypedValue](#type-aliases/TypedValue) | A value that can appear in a typed object tree (primitives, objects, arrays, functions, and symbols). |
36
+ | [TypedKey](#type-aliases/TypedKey) | A valid key for a typed object. Defaults to string | number | symbol unless narrowed by T. |
37
+ | [TypedObject](#type-aliases/TypedObject) | An object whose keys are TypedKey and whose values are TypedValue. |
38
+ | [TypedArray](#type-aliases/TypedArray) | An array of TypedValue elements. |
39
+ | [AnyFunction](#type-aliases/AnyFunction) | A function type that accepts any arguments and returns unknown. |
40
+ | [RecordKey](#type-aliases/RecordKey) | A union of valid object key types. |
37
41
 
38
42
  ## Functions
39
43
 
40
- - [isTypedKey](#functions/isTypedKey)
41
- - [isTypedValue](#functions/isTypedValue)
42
- - [isTypedArray](#functions/isTypedArray)
43
- - [isValidTypedFieldPair](#functions/isValidTypedFieldPair)
44
- - [isTypedObject](#functions/isTypedObject)
45
- - [ifDefined](#functions/ifDefined)
46
- - [ifTypeOf](#functions/ifTypeOf)
47
- - [isUndefined](#functions/isUndefined)
48
- - [isDefined](#functions/isDefined)
49
- - [isNull](#functions/isNull)
50
- - [isDefinedNotNull](#functions/isDefinedNotNull)
51
- - [isUndefinedOrNull](#functions/isUndefinedOrNull)
52
- - [isBigInt](#functions/isBigInt)
53
- - [isString](#functions/isString)
54
- - [isNumber](#functions/isNumber)
55
- - [isObject](#functions/isObject)
56
- - [isArray](#functions/isArray)
57
- - [isFunction](#functions/isFunction)
58
- - [isSymbol](#functions/isSymbol)
59
- - [isEmptyObject](#functions/isEmptyObject)
60
- - [isEmptyString](#functions/isEmptyString)
61
- - [isEmptyArray](#functions/isEmptyArray)
62
- - [isPopulatedArray](#functions/isPopulatedArray)
63
- - [isEmpty](#functions/isEmpty)
64
- - [isFalsy](#functions/isFalsy)
65
- - [isTruthy](#functions/isTruthy)
66
- - [isBoolean](#functions/isBoolean)
67
- - [isDateString](#functions/isDateString)
68
- - [isDate](#functions/isDate)
69
- - [isRegExp](#functions/isRegExp)
70
- - [isError](#functions/isError)
71
- - [isPromise](#functions/isPromise)
72
- - [isPromiseLike](#functions/isPromiseLike)
73
- - [isMap](#functions/isMap)
74
- - [isArrayBufferView](#functions/isArrayBufferView)
75
- - [isSet](#functions/isSet)
76
- - [isWeakMap](#functions/isWeakMap)
77
- - [isWeakSet](#functions/isWeakSet)
78
- - [isDataView](#functions/isDataView)
79
- - [isBlob](#functions/isBlob)
80
- - [isFile](#functions/isFile)
81
- - [isType](#functions/isType)
82
- - [typeOf](#functions/typeOf)
83
- - [validateType](#functions/validateType)
44
+ | Function | Description |
45
+ | ------ | ------ |
46
+ | [isTypedKey](#functions/isTypedKey) | Type guard that checks whether a value is a valid TypedKey (string, bigint, number, or symbol). |
47
+ | [isTypedValue](#functions/isTypedValue) | Type guard that checks whether a value is a valid TypedValue. |
48
+ | [isTypedArray](#functions/isTypedArray) | Type guard that checks whether a value is a TypedArray (an array where every element is a TypedValue). |
49
+ | [isValidTypedFieldPair](#functions/isValidTypedFieldPair) | Type guard that checks whether a key-value pair has a valid TypedKey and TypedValue. |
50
+ | [isTypedObject](#functions/isTypedObject) | Type guard that checks whether a value is a TypedObject (an object with TypedKey keys and TypedValue values). |
51
+ | [ifDefined](#functions/ifDefined) | Invokes the callback only if the value is neither null nor undefined. |
52
+ | [ifTypeOf](#functions/ifTypeOf) | Invokes the callback if the value matches the specified type, with an optional additional predicate. |
53
+ | [isUndefined](#functions/isUndefined) | Type guard that checks whether a value is undefined. |
54
+ | [isDefined](#functions/isDefined) | Type guard that checks whether a value is not undefined. |
55
+ | [isNull](#functions/isNull) | Type guard that checks whether a value is null. |
56
+ | [isDefinedNotNull](#functions/isDefinedNotNull) | Type guard that checks whether a value is neither undefined nor null. |
57
+ | [isUndefinedOrNull](#functions/isUndefinedOrNull) | Type guard that checks whether a value is undefined or null. |
58
+ | [isBigInt](#functions/isBigInt) | Type guard that checks whether a value is a bigint. |
59
+ | [isString](#functions/isString) | Type guard that checks whether a value is a string. |
60
+ | [isNumber](#functions/isNumber) | Type guard that checks whether a value is a number. |
61
+ | [isObject](#functions/isObject) | Type guard that checks whether a value is a plain object (not null and not an array). |
62
+ | [isArray](#functions/isArray) | Type guard that checks whether a value is an array. |
63
+ | [isFunction](#functions/isFunction) | Type guard that checks whether a value is a function. |
64
+ | [isSymbol](#functions/isSymbol) | Type guard that checks whether a value is a symbol. |
65
+ | [isEmptyObject](#functions/isEmptyObject) | Type guard that checks whether a value is an object with no own keys. |
66
+ | [isEmptyString](#functions/isEmptyString) | Type guard that checks whether a value is an empty string. |
67
+ | [isEmptyArray](#functions/isEmptyArray) | Type guard that checks whether a value is an empty array. |
68
+ | [isPopulatedArray](#functions/isPopulatedArray) | Type guard that checks whether a value is a non-empty array. |
69
+ | [isEmpty](#functions/isEmpty) | Type guard that checks whether a value is empty (empty string, empty array, or empty object). |
70
+ | [isFalsy](#functions/isFalsy) | Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n). |
71
+ | [isTruthy](#functions/isTruthy) | Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n). |
72
+ | [isBoolean](#functions/isBoolean) | Type guard that checks whether a value is a boolean. |
73
+ | [isDateString](#functions/isDateString) | Type guard that checks whether a value is a string that can be parsed as a valid date. |
74
+ | [isDate](#functions/isDate) | Type guard that checks whether a value is a Date instance. |
75
+ | [isRegExp](#functions/isRegExp) | Type guard that checks whether a value is a RegExp instance. |
76
+ | [isError](#functions/isError) | Type guard that checks whether a value is an Error instance. |
77
+ | [isPromise](#functions/isPromise) | Type guard that checks whether a value is a Promise instance. |
78
+ | [isPromiseLike](#functions/isPromiseLike) | Type guard that checks whether a value is promise-like (has a `then` method). |
79
+ | [isMap](#functions/isMap) | Type guard that checks whether a value is a Map instance. |
80
+ | [isArrayBufferView](#functions/isArrayBufferView) | Type guard that checks whether a value is an ArrayBufferView (e.g., TypedArray or DataView). |
81
+ | [isSet](#functions/isSet) | Type guard that checks whether a value is a Set instance. |
82
+ | [isWeakMap](#functions/isWeakMap) | Type guard that checks whether a value is a WeakMap instance. |
83
+ | [isWeakSet](#functions/isWeakSet) | Type guard that checks whether a value is a WeakSet instance. |
84
+ | [isDataView](#functions/isDataView) | Type guard that checks whether a value is a DataView instance. |
85
+ | [isBlob](#functions/isBlob) | Type guard that checks whether a value is a Blob instance. |
86
+ | [isFile](#functions/isFile) | Type guard that checks whether a value is a File instance. |
87
+ | [isType](#functions/isType) | Checks whether a value matches the expected field type, with correct handling for arrays and nulls. |
88
+ | [typeOf](#functions/typeOf) | Extended typeof that distinguishes arrays from objects (unlike native `typeof`). |
89
+ | [validateType](#functions/validateType) | Validates that a value matches the expected type, returning the value and any errors. |
84
90
 
85
91
  ### functions
86
92
 
@@ -91,29 +97,30 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
91
97
  ***
92
98
 
93
99
  ```ts
94
- function ifDefined<T>(value, func): T | undefined;
100
+ function ifDefined<T>(value: T, func: (value: T) => void): T | undefined;
95
101
  ```
96
102
 
97
- ## Type Parameters
103
+ Invokes the callback only if the value is neither null nor undefined.
98
104
 
99
- ### T
105
+ ## Type Parameters
100
106
 
101
- `T`
107
+ | Type Parameter |
108
+ | ------ |
109
+ | `T` |
102
110
 
103
111
  ## Parameters
104
112
 
105
- ### value
106
-
107
- `T`
108
-
109
- ### func
110
-
111
- (`value`) => `void`
113
+ | Parameter | Type | Description |
114
+ | ------ | ------ | ------ |
115
+ | `value` | `T` | The value to check. |
116
+ | `func` | (`value`: `T`) => `void` | The callback to invoke with the value if it is defined. |
112
117
 
113
118
  ## Returns
114
119
 
115
120
  `T` \| `undefined`
116
121
 
122
+ The value if defined, or undefined otherwise.
123
+
117
124
  ### <a id="ifTypeOf"></a>ifTypeOf
118
125
 
119
126
  [**@xylabs/typeof**](#../README)
@@ -122,44 +129,36 @@ function ifDefined<T>(value, func): T | undefined;
122
129
 
123
130
  ```ts
124
131
  function ifTypeOf<T, R>(
125
- typeName,
126
- value,
127
- trueFunc,
128
- isFunc?): R | undefined;
132
+ typeName: TypeOfTypes,
133
+ value: unknown,
134
+ trueFunc: (value: T) => R,
135
+ isFunc?: (value: T) => boolean): R | undefined;
129
136
  ```
130
137
 
131
- ## Type Parameters
132
-
133
- ### T
134
-
135
- `T`
138
+ Invokes the callback if the value matches the specified type, with an optional additional predicate.
136
139
 
137
- ### R
140
+ ## Type Parameters
138
141
 
139
- `R`
142
+ | Type Parameter |
143
+ | ------ |
144
+ | `T` |
145
+ | `R` |
140
146
 
141
147
  ## Parameters
142
148
 
143
- ### typeName
144
-
145
- [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
146
-
147
- ### value
148
-
149
- `unknown`
150
-
151
- ### trueFunc
152
-
153
- (`value`) => `R`
154
-
155
- ### isFunc?
156
-
157
- (`value`) => `boolean`
149
+ | Parameter | Type | Description |
150
+ | ------ | ------ | ------ |
151
+ | `typeName` | [`TypeOfTypes`](#../type-aliases/TypeOfTypes) | The expected type name to match against. |
152
+ | `value` | `unknown` | The value to check. |
153
+ | `trueFunc` | (`value`: `T`) => `R` | The callback to invoke if the type matches. |
154
+ | `isFunc?` | (`value`: `T`) => `boolean` | Optional additional predicate that must also return true. |
158
155
 
159
156
  ## Returns
160
157
 
161
158
  `R` \| `undefined`
162
159
 
160
+ The result of trueFunc if the type matches (and isFunc passes), or undefined.
161
+
163
162
  ### <a id="isArray"></a>isArray
164
163
 
165
164
  [**@xylabs/typeof**](#../README)
@@ -169,14 +168,16 @@ function ifTypeOf<T, R>(
169
168
  ## Call Signature
170
169
 
171
170
  ```ts
172
- function isArray(value): value is readonly unknown[];
171
+ function isArray(value: unknown): value is readonly unknown[];
173
172
  ```
174
173
 
175
- ### Parameters
174
+ Type guard that checks whether a value is an array.
176
175
 
177
- ### value
176
+ ### Parameters
178
177
 
179
- `unknown`
178
+ | Parameter | Type |
179
+ | ------ | ------ |
180
+ | `value` | `unknown` |
180
181
 
181
182
  ### Returns
182
183
 
@@ -185,20 +186,22 @@ function isArray(value): value is readonly unknown[];
185
186
  ## Call Signature
186
187
 
187
188
  ```ts
188
- function isArray<T>(value): value is Extract<T, readonly unknown[]>;
189
+ function isArray<T>(value: T): value is Extract<T, readonly unknown[]>;
189
190
  ```
190
191
 
191
- ### Type Parameters
192
+ Type guard that checks whether a value is an array.
192
193
 
193
- ### T
194
+ ### Type Parameters
194
195
 
195
- `T`
196
+ | Type Parameter |
197
+ | ------ |
198
+ | `T` |
196
199
 
197
200
  ### Parameters
198
201
 
199
- ### value
200
-
201
- `T`
202
+ | Parameter | Type |
203
+ | ------ | ------ |
204
+ | `value` | `T` |
202
205
 
203
206
  ### Returns
204
207
 
@@ -213,14 +216,16 @@ function isArray<T>(value): value is Extract<T, readonly unknown[]>;
213
216
  ## Call Signature
214
217
 
215
218
  ```ts
216
- function isArrayBufferView(value): value is ArrayBufferView<ArrayBufferLike>;
219
+ function isArrayBufferView(value: unknown): value is ArrayBufferView<ArrayBufferLike>;
217
220
  ```
218
221
 
222
+ Type guard that checks whether a value is an ArrayBufferView (e.g., TypedArray or DataView).
223
+
219
224
  ### Parameters
220
225
 
221
- ### value
222
-
223
- `unknown`
226
+ | Parameter | Type |
227
+ | ------ | ------ |
228
+ | `value` | `unknown` |
224
229
 
225
230
  ### Returns
226
231
 
@@ -229,20 +234,22 @@ function isArrayBufferView(value): value is ArrayBufferView<ArrayBufferLike>;
229
234
  ## Call Signature
230
235
 
231
236
  ```ts
232
- function isArrayBufferView<T>(value): value is Extract<T, ArrayBufferView<ArrayBufferLike>>;
237
+ function isArrayBufferView<T>(value: T): value is Extract<T, ArrayBufferView<ArrayBufferLike>>;
233
238
  ```
234
239
 
235
- ### Type Parameters
240
+ Type guard that checks whether a value is an ArrayBufferView (e.g., TypedArray or DataView).
236
241
 
237
- ### T
242
+ ### Type Parameters
238
243
 
239
- `T` *extends* `ArrayBufferView`\<`ArrayBufferLike`\>
244
+ | Type Parameter |
245
+ | ------ |
246
+ | `T` *extends* `ArrayBufferView`\<`ArrayBufferLike`\> |
240
247
 
241
248
  ### Parameters
242
249
 
243
- ### value
244
-
245
- `T`
250
+ | Parameter | Type |
251
+ | ------ | ------ |
252
+ | `value` | `T` |
246
253
 
247
254
  ### Returns
248
255
 
@@ -257,14 +264,16 @@ function isArrayBufferView<T>(value): value is Extract<T, ArrayBufferView<ArrayB
257
264
  ## Call Signature
258
265
 
259
266
  ```ts
260
- function isBigInt(value): value is bigint;
267
+ function isBigInt(value: unknown): value is bigint;
261
268
  ```
262
269
 
263
- ### Parameters
270
+ Type guard that checks whether a value is a bigint.
264
271
 
265
- ### value
272
+ ### Parameters
266
273
 
267
- `unknown`
274
+ | Parameter | Type |
275
+ | ------ | ------ |
276
+ | `value` | `unknown` |
268
277
 
269
278
  ### Returns
270
279
 
@@ -273,20 +282,22 @@ function isBigInt(value): value is bigint;
273
282
  ## Call Signature
274
283
 
275
284
  ```ts
276
- function isBigInt<T>(value): value is Extract<T, bigint>;
285
+ function isBigInt<T>(value: T): value is Extract<T, bigint>;
277
286
  ```
278
287
 
279
- ### Type Parameters
288
+ Type guard that checks whether a value is a bigint.
280
289
 
281
- ### T
290
+ ### Type Parameters
282
291
 
283
- `T` *extends* `bigint`
292
+ | Type Parameter |
293
+ | ------ |
294
+ | `T` *extends* `bigint` |
284
295
 
285
296
  ### Parameters
286
297
 
287
- ### value
288
-
289
- `T`
298
+ | Parameter | Type |
299
+ | ------ | ------ |
300
+ | `value` | `T` |
290
301
 
291
302
  ### Returns
292
303
 
@@ -301,14 +312,16 @@ function isBigInt<T>(value): value is Extract<T, bigint>;
301
312
  ## Call Signature
302
313
 
303
314
  ```ts
304
- function isBlob(value): value is Blob;
315
+ function isBlob(value: unknown): value is Blob;
305
316
  ```
306
317
 
318
+ Type guard that checks whether a value is a Blob instance.
319
+
307
320
  ### Parameters
308
321
 
309
- ### value
310
-
311
- `unknown`
322
+ | Parameter | Type |
323
+ | ------ | ------ |
324
+ | `value` | `unknown` |
312
325
 
313
326
  ### Returns
314
327
 
@@ -317,20 +330,22 @@ function isBlob(value): value is Blob;
317
330
  ## Call Signature
318
331
 
319
332
  ```ts
320
- function isBlob<T>(value): value is Extract<T, Blob>;
333
+ function isBlob<T>(value: T): value is Extract<T, Blob>;
321
334
  ```
322
335
 
323
- ### Type Parameters
336
+ Type guard that checks whether a value is a Blob instance.
324
337
 
325
- ### T
338
+ ### Type Parameters
326
339
 
327
- `T` *extends* `Blob`
340
+ | Type Parameter |
341
+ | ------ |
342
+ | `T` *extends* `Blob` |
328
343
 
329
344
  ### Parameters
330
345
 
331
- ### value
332
-
333
- `T`
346
+ | Parameter | Type |
347
+ | ------ | ------ |
348
+ | `value` | `T` |
334
349
 
335
350
  ### Returns
336
351
 
@@ -345,14 +360,16 @@ function isBlob<T>(value): value is Extract<T, Blob>;
345
360
  ## Call Signature
346
361
 
347
362
  ```ts
348
- function isBoolean(value): value is boolean;
363
+ function isBoolean(value: unknown): value is boolean;
349
364
  ```
350
365
 
366
+ Type guard that checks whether a value is a boolean.
367
+
351
368
  ### Parameters
352
369
 
353
- ### value
354
-
355
- `unknown`
370
+ | Parameter | Type |
371
+ | ------ | ------ |
372
+ | `value` | `unknown` |
356
373
 
357
374
  ### Returns
358
375
 
@@ -361,20 +378,22 @@ function isBoolean(value): value is boolean;
361
378
  ## Call Signature
362
379
 
363
380
  ```ts
364
- function isBoolean<T>(value): value is Extract<T, boolean>;
381
+ function isBoolean<T>(value: T): value is Extract<T, boolean>;
365
382
  ```
366
383
 
367
- ### Type Parameters
384
+ Type guard that checks whether a value is a boolean.
368
385
 
369
- ### T
386
+ ### Type Parameters
370
387
 
371
- `T` *extends* `boolean`
388
+ | Type Parameter |
389
+ | ------ |
390
+ | `T` *extends* `boolean` |
372
391
 
373
392
  ### Parameters
374
393
 
375
- ### value
376
-
377
- `T`
394
+ | Parameter | Type |
395
+ | ------ | ------ |
396
+ | `value` | `T` |
378
397
 
379
398
  ### Returns
380
399
 
@@ -389,14 +408,16 @@ function isBoolean<T>(value): value is Extract<T, boolean>;
389
408
  ## Call Signature
390
409
 
391
410
  ```ts
392
- function isDataView(value): value is DataView<ArrayBufferLike>;
411
+ function isDataView(value: unknown): value is DataView<ArrayBufferLike>;
393
412
  ```
394
413
 
395
- ### Parameters
414
+ Type guard that checks whether a value is a DataView instance.
396
415
 
397
- ### value
416
+ ### Parameters
398
417
 
399
- `unknown`
418
+ | Parameter | Type |
419
+ | ------ | ------ |
420
+ | `value` | `unknown` |
400
421
 
401
422
  ### Returns
402
423
 
@@ -405,20 +426,22 @@ function isDataView(value): value is DataView<ArrayBufferLike>;
405
426
  ## Call Signature
406
427
 
407
428
  ```ts
408
- function isDataView<T>(value): value is Extract<T, DataView<ArrayBufferLike>>;
429
+ function isDataView<T>(value: T): value is Extract<T, DataView<ArrayBufferLike>>;
409
430
  ```
410
431
 
411
- ### Type Parameters
432
+ Type guard that checks whether a value is a DataView instance.
412
433
 
413
- ### T
434
+ ### Type Parameters
414
435
 
415
- `T`
436
+ | Type Parameter |
437
+ | ------ |
438
+ | `T` |
416
439
 
417
440
  ### Parameters
418
441
 
419
- ### value
420
-
421
- `T`
442
+ | Parameter | Type |
443
+ | ------ | ------ |
444
+ | `value` | `T` |
422
445
 
423
446
  ### Returns
424
447
 
@@ -433,14 +456,16 @@ function isDataView<T>(value): value is Extract<T, DataView<ArrayBufferLike>>;
433
456
  ## Call Signature
434
457
 
435
458
  ```ts
436
- function isDate(value): value is Date;
459
+ function isDate(value: unknown): value is Date;
437
460
  ```
438
461
 
439
- ### Parameters
462
+ Type guard that checks whether a value is a Date instance.
440
463
 
441
- ### value
464
+ ### Parameters
442
465
 
443
- `unknown`
466
+ | Parameter | Type |
467
+ | ------ | ------ |
468
+ | `value` | `unknown` |
444
469
 
445
470
  ### Returns
446
471
 
@@ -449,20 +474,22 @@ function isDate(value): value is Date;
449
474
  ## Call Signature
450
475
 
451
476
  ```ts
452
- function isDate<T>(value): value is Extract<T, Date>;
477
+ function isDate<T>(value: T): value is Extract<T, Date>;
453
478
  ```
454
479
 
455
- ### Type Parameters
480
+ Type guard that checks whether a value is a Date instance.
456
481
 
457
- ### T
482
+ ### Type Parameters
458
483
 
459
- `T`
484
+ | Type Parameter |
485
+ | ------ |
486
+ | `T` |
460
487
 
461
488
  ### Parameters
462
489
 
463
- ### value
464
-
465
- `T`
490
+ | Parameter | Type |
491
+ | ------ | ------ |
492
+ | `value` | `T` |
466
493
 
467
494
  ### Returns
468
495
 
@@ -477,14 +504,16 @@ function isDate<T>(value): value is Extract<T, Date>;
477
504
  ## Call Signature
478
505
 
479
506
  ```ts
480
- function isDateString(value): value is string;
507
+ function isDateString(value: unknown): value is string;
481
508
  ```
482
509
 
510
+ Type guard that checks whether a value is a string that can be parsed as a valid date.
511
+
483
512
  ### Parameters
484
513
 
485
- ### value
486
-
487
- `unknown`
514
+ | Parameter | Type |
515
+ | ------ | ------ |
516
+ | `value` | `unknown` |
488
517
 
489
518
  ### Returns
490
519
 
@@ -493,20 +522,22 @@ function isDateString(value): value is string;
493
522
  ## Call Signature
494
523
 
495
524
  ```ts
496
- function isDateString<T>(value): value is Extract<T, string>;
525
+ function isDateString<T>(value: T): value is Extract<T, string>;
497
526
  ```
498
527
 
499
- ### Type Parameters
528
+ Type guard that checks whether a value is a string that can be parsed as a valid date.
500
529
 
501
- ### T
530
+ ### Type Parameters
502
531
 
503
- `T`
532
+ | Type Parameter |
533
+ | ------ |
534
+ | `T` |
504
535
 
505
536
  ### Parameters
506
537
 
507
- ### value
508
-
509
- `T`
538
+ | Parameter | Type |
539
+ | ------ | ------ |
540
+ | `value` | `T` |
510
541
 
511
542
  ### Returns
512
543
 
@@ -519,20 +550,22 @@ function isDateString<T>(value): value is Extract<T, string>;
519
550
  ***
520
551
 
521
552
  ```ts
522
- function isDefined<T>(value): value is Exclude<T, undefined>;
553
+ function isDefined<T>(value: T): value is Exclude<T, undefined>;
523
554
  ```
524
555
 
525
- ## Type Parameters
556
+ Type guard that checks whether a value is not undefined.
526
557
 
527
- ### T
558
+ ## Type Parameters
528
559
 
529
- `T`
560
+ | Type Parameter |
561
+ | ------ |
562
+ | `T` |
530
563
 
531
564
  ## Parameters
532
565
 
533
- ### value
534
-
535
- `T`
566
+ | Parameter | Type |
567
+ | ------ | ------ |
568
+ | `value` | `T` |
536
569
 
537
570
  ## Returns
538
571
 
@@ -545,20 +578,22 @@ function isDefined<T>(value): value is Exclude<T, undefined>;
545
578
  ***
546
579
 
547
580
  ```ts
548
- function isDefinedNotNull<T>(value): value is Exclude<T, null | undefined>;
581
+ function isDefinedNotNull<T>(value: T): value is Exclude<T, null | undefined>;
549
582
  ```
550
583
 
551
- ## Type Parameters
584
+ Type guard that checks whether a value is neither undefined nor null.
552
585
 
553
- ### T
586
+ ## Type Parameters
554
587
 
555
- `T`
588
+ | Type Parameter |
589
+ | ------ |
590
+ | `T` |
556
591
 
557
592
  ## Parameters
558
593
 
559
- ### value
560
-
561
- `T`
594
+ | Parameter | Type |
595
+ | ------ | ------ |
596
+ | `value` | `T` |
562
597
 
563
598
  ## Returns
564
599
 
@@ -573,20 +608,22 @@ value is Exclude\<T, null \| undefined\>
573
608
  ## Call Signature
574
609
 
575
610
  ```ts
576
- function isEmpty<T>(value): value is T;
611
+ function isEmpty<T>(value: unknown): value is T;
577
612
  ```
578
613
 
579
- ### Type Parameters
614
+ Type guard that checks whether a value is empty (empty string, empty array, or empty object).
580
615
 
581
- ### T
616
+ ### Type Parameters
582
617
 
583
- `T`
618
+ | Type Parameter |
619
+ | ------ |
620
+ | `T` |
584
621
 
585
622
  ### Parameters
586
623
 
587
- ### value
588
-
589
- `unknown`
624
+ | Parameter | Type |
625
+ | ------ | ------ |
626
+ | `value` | `unknown` |
590
627
 
591
628
  ### Returns
592
629
 
@@ -595,28 +632,24 @@ function isEmpty<T>(value): value is T;
595
632
  ## Call Signature
596
633
 
597
634
  ```ts
598
- function isEmpty<K, V, T>(value): value is Extract<T, Record<K, never>>;
635
+ function isEmpty<K, V, T>(value: T): value is Extract<T, Record<K, never>>;
599
636
  ```
600
637
 
601
- ### Type Parameters
602
-
603
- ### K
604
-
605
- `K` *extends* [`RecordKey`](#../type-aliases/RecordKey)
638
+ Type guard that checks whether a value is empty (empty string, empty array, or empty object).
606
639
 
607
- ### V
608
-
609
- `V`
610
-
611
- ### T
640
+ ### Type Parameters
612
641
 
613
- `T` *extends* `Record`\<`K`, `V`\>
642
+ | Type Parameter |
643
+ | ------ |
644
+ | `K` *extends* [`RecordKey`](#../type-aliases/RecordKey) |
645
+ | `V` |
646
+ | `T` *extends* `Record`\<`K`, `V`\> |
614
647
 
615
648
  ### Parameters
616
649
 
617
- ### value
618
-
619
- `T`
650
+ | Parameter | Type |
651
+ | ------ | ------ |
652
+ | `value` | `T` |
620
653
 
621
654
  ### Returns
622
655
 
@@ -625,20 +658,22 @@ function isEmpty<K, V, T>(value): value is Extract<T, Record<K, never>>;
625
658
  ## Call Signature
626
659
 
627
660
  ```ts
628
- function isEmpty<T>(value): value is Extract<T, never[]>;
661
+ function isEmpty<T>(value: T): value is Extract<T, never[]>;
629
662
  ```
630
663
 
631
- ### Type Parameters
664
+ Type guard that checks whether a value is empty (empty string, empty array, or empty object).
632
665
 
633
- ### T
666
+ ### Type Parameters
634
667
 
635
- `T` *extends* `unknown`[]
668
+ | Type Parameter |
669
+ | ------ |
670
+ | `T` *extends* `unknown`[] |
636
671
 
637
672
  ### Parameters
638
673
 
639
- ### value
640
-
641
- `T`
674
+ | Parameter | Type |
675
+ | ------ | ------ |
676
+ | `value` | `T` |
642
677
 
643
678
  ### Returns
644
679
 
@@ -653,14 +688,16 @@ function isEmpty<T>(value): value is Extract<T, never[]>;
653
688
  ## Call Signature
654
689
 
655
690
  ```ts
656
- function isEmptyArray(value): value is [];
691
+ function isEmptyArray(value: unknown): value is [];
657
692
  ```
658
693
 
694
+ Type guard that checks whether a value is an empty array.
695
+
659
696
  ### Parameters
660
697
 
661
- ### value
662
-
663
- `unknown`
698
+ | Parameter | Type |
699
+ | ------ | ------ |
700
+ | `value` | `unknown` |
664
701
 
665
702
  ### Returns
666
703
 
@@ -669,20 +706,22 @@ function isEmptyArray(value): value is [];
669
706
  ## Call Signature
670
707
 
671
708
  ```ts
672
- function isEmptyArray<T>(value): value is Extract<T, unknown[]>;
709
+ function isEmptyArray<T>(value: T): value is Extract<T, unknown[]>;
673
710
  ```
674
711
 
675
- ### Type Parameters
712
+ Type guard that checks whether a value is an empty array.
676
713
 
677
- ### T
714
+ ### Type Parameters
678
715
 
679
- `T` *extends* `unknown`[]
716
+ | Type Parameter |
717
+ | ------ |
718
+ | `T` *extends* `unknown`[] |
680
719
 
681
720
  ### Parameters
682
721
 
683
- ### value
684
-
685
- `T`
722
+ | Parameter | Type |
723
+ | ------ | ------ |
724
+ | `value` | `T` |
686
725
 
687
726
  ### Returns
688
727
 
@@ -697,14 +736,16 @@ function isEmptyArray<T>(value): value is Extract<T, unknown[]>;
697
736
  ## Call Signature
698
737
 
699
738
  ```ts
700
- function isEmptyObject(value): value is {};
739
+ function isEmptyObject(value: unknown): value is {};
701
740
  ```
702
741
 
703
- ### Parameters
742
+ Type guard that checks whether a value is an object with no own keys.
704
743
 
705
- ### value
744
+ ### Parameters
706
745
 
707
- `unknown`
746
+ | Parameter | Type |
747
+ | ------ | ------ |
748
+ | `value` | `unknown` |
708
749
 
709
750
  ### Returns
710
751
 
@@ -713,28 +754,24 @@ function isEmptyObject(value): value is {};
713
754
  ## Call Signature
714
755
 
715
756
  ```ts
716
- function isEmptyObject<K, V, T>(value): value is Extract<T, Record<K, never>>;
757
+ function isEmptyObject<K, V, T>(value: T): value is Extract<T, Record<K, never>>;
717
758
  ```
718
759
 
719
- ### Type Parameters
720
-
721
- ### K
722
-
723
- `K` *extends* [`RecordKey`](#../type-aliases/RecordKey)
724
-
725
- ### V
726
-
727
- `V`
760
+ Type guard that checks whether a value is an object with no own keys.
728
761
 
729
- ### T
762
+ ### Type Parameters
730
763
 
731
- `T` *extends* `Record`\<`K`, `V`\>
764
+ | Type Parameter |
765
+ | ------ |
766
+ | `K` *extends* [`RecordKey`](#../type-aliases/RecordKey) |
767
+ | `V` |
768
+ | `T` *extends* `Record`\<`K`, `V`\> |
732
769
 
733
770
  ### Parameters
734
771
 
735
- ### value
736
-
737
- `T`
772
+ | Parameter | Type |
773
+ | ------ | ------ |
774
+ | `value` | `T` |
738
775
 
739
776
  ### Returns
740
777
 
@@ -749,14 +786,16 @@ function isEmptyObject<K, V, T>(value): value is Extract<T, Record<K, never>>;
749
786
  ## Call Signature
750
787
 
751
788
  ```ts
752
- function isEmptyString(value): value is "";
789
+ function isEmptyString(value: unknown): value is "";
753
790
  ```
754
791
 
755
- ### Parameters
792
+ Type guard that checks whether a value is an empty string.
756
793
 
757
- ### value
794
+ ### Parameters
758
795
 
759
- `unknown`
796
+ | Parameter | Type |
797
+ | ------ | ------ |
798
+ | `value` | `unknown` |
760
799
 
761
800
  ### Returns
762
801
 
@@ -765,20 +804,22 @@ function isEmptyString(value): value is "";
765
804
  ## Call Signature
766
805
 
767
806
  ```ts
768
- function isEmptyString<T>(value): value is Extract<T, "">;
807
+ function isEmptyString<T>(value: T): value is Extract<T, "">;
769
808
  ```
770
809
 
771
- ### Type Parameters
810
+ Type guard that checks whether a value is an empty string.
772
811
 
773
- ### T
812
+ ### Type Parameters
774
813
 
775
- `T` *extends* `string`
814
+ | Type Parameter |
815
+ | ------ |
816
+ | `T` *extends* `string` |
776
817
 
777
818
  ### Parameters
778
819
 
779
- ### value
780
-
781
- `T`
820
+ | Parameter | Type |
821
+ | ------ | ------ |
822
+ | `value` | `T` |
782
823
 
783
824
  ### Returns
784
825
 
@@ -793,14 +834,16 @@ function isEmptyString<T>(value): value is Extract<T, "">;
793
834
  ## Call Signature
794
835
 
795
836
  ```ts
796
- function isError(value): value is Error;
837
+ function isError(value: unknown): value is Error;
797
838
  ```
798
839
 
799
- ### Parameters
840
+ Type guard that checks whether a value is an Error instance.
800
841
 
801
- ### value
842
+ ### Parameters
802
843
 
803
- `unknown`
844
+ | Parameter | Type |
845
+ | ------ | ------ |
846
+ | `value` | `unknown` |
804
847
 
805
848
  ### Returns
806
849
 
@@ -809,20 +852,22 @@ function isError(value): value is Error;
809
852
  ## Call Signature
810
853
 
811
854
  ```ts
812
- function isError<T>(value): value is Extract<T, Error>;
855
+ function isError<T>(value: T): value is Extract<T, Error>;
813
856
  ```
814
857
 
815
- ### Type Parameters
858
+ Type guard that checks whether a value is an Error instance.
816
859
 
817
- ### T
860
+ ### Type Parameters
818
861
 
819
- `T`
862
+ | Type Parameter |
863
+ | ------ |
864
+ | `T` |
820
865
 
821
866
  ### Parameters
822
867
 
823
- ### value
824
-
825
- `T`
868
+ | Parameter | Type |
869
+ | ------ | ------ |
870
+ | `value` | `T` |
826
871
 
827
872
  ### Returns
828
873
 
@@ -837,20 +882,22 @@ function isError<T>(value): value is Extract<T, Error>;
837
882
  ## Call Signature
838
883
 
839
884
  ```ts
840
- function isFalsy<T>(value): value is Extract<T, false | "" | 0 | 0n | null | undefined>;
885
+ function isFalsy<T>(value: T): value is Extract<T, false | "" | 0 | 0n | null | undefined>;
841
886
  ```
842
887
 
843
- ### Type Parameters
888
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
844
889
 
845
- ### T
890
+ ### Type Parameters
846
891
 
847
- `T`
892
+ | Type Parameter |
893
+ | ------ |
894
+ | `T` |
848
895
 
849
896
  ### Parameters
850
897
 
851
- ### value
852
-
853
- `T`
898
+ | Parameter | Type |
899
+ | ------ | ------ |
900
+ | `value` | `T` |
854
901
 
855
902
  ### Returns
856
903
 
@@ -859,20 +906,22 @@ value is Extract\<T, false \| "" \| 0 \| 0n \| null \| undefined\>
859
906
  ## Call Signature
860
907
 
861
908
  ```ts
862
- function isFalsy<T>(value): value is Extract<T, false>;
909
+ function isFalsy<T>(value: T): value is Extract<T, false>;
863
910
  ```
864
911
 
865
- ### Type Parameters
912
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
866
913
 
867
- ### T
914
+ ### Type Parameters
868
915
 
869
- `T` *extends* `boolean`
916
+ | Type Parameter |
917
+ | ------ |
918
+ | `T` *extends* `boolean` |
870
919
 
871
920
  ### Parameters
872
921
 
873
- ### value
874
-
875
- `T`
922
+ | Parameter | Type |
923
+ | ------ | ------ |
924
+ | `value` | `T` |
876
925
 
877
926
  ### Returns
878
927
 
@@ -881,20 +930,22 @@ function isFalsy<T>(value): value is Extract<T, false>;
881
930
  ## Call Signature
882
931
 
883
932
  ```ts
884
- function isFalsy<T>(value): value is Extract<T, 0>;
933
+ function isFalsy<T>(value: T): value is Extract<T, 0>;
885
934
  ```
886
935
 
887
- ### Type Parameters
936
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
888
937
 
889
- ### T
938
+ ### Type Parameters
890
939
 
891
- `T` *extends* `number`
940
+ | Type Parameter |
941
+ | ------ |
942
+ | `T` *extends* `number` |
892
943
 
893
944
  ### Parameters
894
945
 
895
- ### value
896
-
897
- `T`
946
+ | Parameter | Type |
947
+ | ------ | ------ |
948
+ | `value` | `T` |
898
949
 
899
950
  ### Returns
900
951
 
@@ -903,20 +954,22 @@ function isFalsy<T>(value): value is Extract<T, 0>;
903
954
  ## Call Signature
904
955
 
905
956
  ```ts
906
- function isFalsy<T>(value): value is Extract<T, 0n>;
957
+ function isFalsy<T>(value: T): value is Extract<T, 0n>;
907
958
  ```
908
959
 
909
- ### Type Parameters
960
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
910
961
 
911
- ### T
962
+ ### Type Parameters
912
963
 
913
- `T` *extends* `bigint`
964
+ | Type Parameter |
965
+ | ------ |
966
+ | `T` *extends* `bigint` |
914
967
 
915
968
  ### Parameters
916
969
 
917
- ### value
918
-
919
- `T`
970
+ | Parameter | Type |
971
+ | ------ | ------ |
972
+ | `value` | `T` |
920
973
 
921
974
  ### Returns
922
975
 
@@ -925,20 +978,22 @@ function isFalsy<T>(value): value is Extract<T, 0n>;
925
978
  ## Call Signature
926
979
 
927
980
  ```ts
928
- function isFalsy<T>(value): value is Extract<T, null>;
981
+ function isFalsy<T>(value: T): value is Extract<T, null>;
929
982
  ```
930
983
 
931
- ### Type Parameters
984
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
932
985
 
933
- ### T
986
+ ### Type Parameters
934
987
 
935
- `T` *extends* `null`
988
+ | Type Parameter |
989
+ | ------ |
990
+ | `T` *extends* `null` |
936
991
 
937
992
  ### Parameters
938
993
 
939
- ### value
940
-
941
- `T`
994
+ | Parameter | Type |
995
+ | ------ | ------ |
996
+ | `value` | `T` |
942
997
 
943
998
  ### Returns
944
999
 
@@ -947,20 +1002,22 @@ function isFalsy<T>(value): value is Extract<T, null>;
947
1002
  ## Call Signature
948
1003
 
949
1004
  ```ts
950
- function isFalsy<T>(value): value is Extract<T, undefined>;
1005
+ function isFalsy<T>(value: T): value is Extract<T, undefined>;
951
1006
  ```
952
1007
 
953
- ### Type Parameters
1008
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
954
1009
 
955
- ### T
1010
+ ### Type Parameters
956
1011
 
957
- `T` *extends* `undefined`
1012
+ | Type Parameter |
1013
+ | ------ |
1014
+ | `T` *extends* `undefined` |
958
1015
 
959
1016
  ### Parameters
960
1017
 
961
- ### value
962
-
963
- `T`
1018
+ | Parameter | Type |
1019
+ | ------ | ------ |
1020
+ | `value` | `T` |
964
1021
 
965
1022
  ### Returns
966
1023
 
@@ -969,20 +1026,22 @@ function isFalsy<T>(value): value is Extract<T, undefined>;
969
1026
  ## Call Signature
970
1027
 
971
1028
  ```ts
972
- function isFalsy<T>(value): value is Extract<T, "">;
1029
+ function isFalsy<T>(value: T): value is Extract<T, "">;
973
1030
  ```
974
1031
 
975
- ### Type Parameters
1032
+ Type guard that checks whether a value is falsy (0, null, undefined, false, '', or 0n).
976
1033
 
977
- ### T
1034
+ ### Type Parameters
978
1035
 
979
- `T` *extends* `string`
1036
+ | Type Parameter |
1037
+ | ------ |
1038
+ | `T` *extends* `string` |
980
1039
 
981
1040
  ### Parameters
982
1041
 
983
- ### value
984
-
985
- `T`
1042
+ | Parameter | Type |
1043
+ | ------ | ------ |
1044
+ | `value` | `T` |
986
1045
 
987
1046
  ### Returns
988
1047
 
@@ -997,14 +1056,16 @@ function isFalsy<T>(value): value is Extract<T, "">;
997
1056
  ## Call Signature
998
1057
 
999
1058
  ```ts
1000
- function isFile(value): value is File;
1059
+ function isFile(value: unknown): value is File;
1001
1060
  ```
1002
1061
 
1003
- ### Parameters
1062
+ Type guard that checks whether a value is a File instance.
1004
1063
 
1005
- ### value
1064
+ ### Parameters
1006
1065
 
1007
- `unknown`
1066
+ | Parameter | Type |
1067
+ | ------ | ------ |
1068
+ | `value` | `unknown` |
1008
1069
 
1009
1070
  ### Returns
1010
1071
 
@@ -1013,20 +1074,22 @@ function isFile(value): value is File;
1013
1074
  ## Call Signature
1014
1075
 
1015
1076
  ```ts
1016
- function isFile<T>(value): value is Extract<T, File>;
1077
+ function isFile<T>(value: T): value is Extract<T, File>;
1017
1078
  ```
1018
1079
 
1019
- ### Type Parameters
1080
+ Type guard that checks whether a value is a File instance.
1020
1081
 
1021
- ### T
1082
+ ### Type Parameters
1022
1083
 
1023
- `T` *extends* `File`
1084
+ | Type Parameter |
1085
+ | ------ |
1086
+ | `T` *extends* `File` |
1024
1087
 
1025
1088
  ### Parameters
1026
1089
 
1027
- ### value
1028
-
1029
- `T`
1090
+ | Parameter | Type |
1091
+ | ------ | ------ |
1092
+ | `value` | `T` |
1030
1093
 
1031
1094
  ### Returns
1032
1095
 
@@ -1041,14 +1104,16 @@ function isFile<T>(value): value is Extract<T, File>;
1041
1104
  ## Call Signature
1042
1105
 
1043
1106
  ```ts
1044
- function isFunction(value): value is AnyFunction;
1107
+ function isFunction(value: unknown): value is AnyFunction;
1045
1108
  ```
1046
1109
 
1047
- ### Parameters
1110
+ Type guard that checks whether a value is a function.
1048
1111
 
1049
- ### value
1112
+ ### Parameters
1050
1113
 
1051
- `unknown`
1114
+ | Parameter | Type |
1115
+ | ------ | ------ |
1116
+ | `value` | `unknown` |
1052
1117
 
1053
1118
  ### Returns
1054
1119
 
@@ -1057,20 +1122,22 @@ function isFunction(value): value is AnyFunction;
1057
1122
  ## Call Signature
1058
1123
 
1059
1124
  ```ts
1060
- function isFunction<T>(value): value is Extract<T, AnyFunction>;
1125
+ function isFunction<T>(value: T): value is Extract<T, AnyFunction>;
1061
1126
  ```
1062
1127
 
1063
- ### Type Parameters
1128
+ Type guard that checks whether a value is a function.
1064
1129
 
1065
- ### T
1130
+ ### Type Parameters
1066
1131
 
1067
- `T` *extends* [`AnyFunction`](#../type-aliases/AnyFunction)
1132
+ | Type Parameter |
1133
+ | ------ |
1134
+ | `T` *extends* [`AnyFunction`](#../type-aliases/AnyFunction) |
1068
1135
 
1069
1136
  ### Parameters
1070
1137
 
1071
- ### value
1072
-
1073
- `T`
1138
+ | Parameter | Type |
1139
+ | ------ | ------ |
1140
+ | `value` | `T` |
1074
1141
 
1075
1142
  ### Returns
1076
1143
 
@@ -1085,14 +1152,16 @@ function isFunction<T>(value): value is Extract<T, AnyFunction>;
1085
1152
  ## Call Signature
1086
1153
 
1087
1154
  ```ts
1088
- function isMap(value): value is Map<unknown, unknown>;
1155
+ function isMap(value: unknown): value is Map<unknown, unknown>;
1089
1156
  ```
1090
1157
 
1158
+ Type guard that checks whether a value is a Map instance.
1159
+
1091
1160
  ### Parameters
1092
1161
 
1093
- ### value
1094
-
1095
- `unknown`
1162
+ | Parameter | Type |
1163
+ | ------ | ------ |
1164
+ | `value` | `unknown` |
1096
1165
 
1097
1166
  ### Returns
1098
1167
 
@@ -1101,28 +1170,24 @@ function isMap(value): value is Map<unknown, unknown>;
1101
1170
  ## Call Signature
1102
1171
 
1103
1172
  ```ts
1104
- function isMap<K, V, T>(value): value is Extract<T, Map<K, V>>;
1173
+ function isMap<K, V, T>(value: T): value is Extract<T, Map<K, V>>;
1105
1174
  ```
1106
1175
 
1107
- ### Type Parameters
1108
-
1109
- ### K
1110
-
1111
- `K`
1112
-
1113
- ### V
1176
+ Type guard that checks whether a value is a Map instance.
1114
1177
 
1115
- `V`
1116
-
1117
- ### T
1178
+ ### Type Parameters
1118
1179
 
1119
- `T` *extends* `Map`\<`K`, `V`\>
1180
+ | Type Parameter |
1181
+ | ------ |
1182
+ | `K` |
1183
+ | `V` |
1184
+ | `T` *extends* `Map`\<`K`, `V`\> |
1120
1185
 
1121
1186
  ### Parameters
1122
1187
 
1123
- ### value
1124
-
1125
- `T`
1188
+ | Parameter | Type |
1189
+ | ------ | ------ |
1190
+ | `value` | `T` |
1126
1191
 
1127
1192
  ### Returns
1128
1193
 
@@ -1137,14 +1202,16 @@ function isMap<K, V, T>(value): value is Extract<T, Map<K, V>>;
1137
1202
  ## Call Signature
1138
1203
 
1139
1204
  ```ts
1140
- function isNull(value): value is null;
1205
+ function isNull(value: unknown): value is null;
1141
1206
  ```
1142
1207
 
1208
+ Type guard that checks whether a value is null.
1209
+
1143
1210
  ### Parameters
1144
1211
 
1145
- ### value
1146
-
1147
- `unknown`
1212
+ | Parameter | Type |
1213
+ | ------ | ------ |
1214
+ | `value` | `unknown` |
1148
1215
 
1149
1216
  ### Returns
1150
1217
 
@@ -1153,20 +1220,22 @@ function isNull(value): value is null;
1153
1220
  ## Call Signature
1154
1221
 
1155
1222
  ```ts
1156
- function isNull<T>(value): value is Extract<T, null>;
1223
+ function isNull<T>(value: T): value is Extract<T, null>;
1157
1224
  ```
1158
1225
 
1159
- ### Type Parameters
1226
+ Type guard that checks whether a value is null.
1160
1227
 
1161
- ### T
1228
+ ### Type Parameters
1162
1229
 
1163
- `T`
1230
+ | Type Parameter |
1231
+ | ------ |
1232
+ | `T` |
1164
1233
 
1165
1234
  ### Parameters
1166
1235
 
1167
- ### value
1168
-
1169
- `T`
1236
+ | Parameter | Type |
1237
+ | ------ | ------ |
1238
+ | `value` | `T` |
1170
1239
 
1171
1240
  ### Returns
1172
1241
 
@@ -1181,14 +1250,16 @@ function isNull<T>(value): value is Extract<T, null>;
1181
1250
  ## Call Signature
1182
1251
 
1183
1252
  ```ts
1184
- function isNumber(value): value is number;
1253
+ function isNumber(value: unknown): value is number;
1185
1254
  ```
1186
1255
 
1187
- ### Parameters
1256
+ Type guard that checks whether a value is a number.
1188
1257
 
1189
- ### value
1258
+ ### Parameters
1190
1259
 
1191
- `unknown`
1260
+ | Parameter | Type |
1261
+ | ------ | ------ |
1262
+ | `value` | `unknown` |
1192
1263
 
1193
1264
  ### Returns
1194
1265
 
@@ -1197,20 +1268,22 @@ function isNumber(value): value is number;
1197
1268
  ## Call Signature
1198
1269
 
1199
1270
  ```ts
1200
- function isNumber<T>(value): value is Extract<T, number>;
1271
+ function isNumber<T>(value: T): value is Extract<T, number>;
1201
1272
  ```
1202
1273
 
1203
- ### Type Parameters
1274
+ Type guard that checks whether a value is a number.
1204
1275
 
1205
- ### T
1276
+ ### Type Parameters
1206
1277
 
1207
- `T` *extends* `number`
1278
+ | Type Parameter |
1279
+ | ------ |
1280
+ | `T` *extends* `number` |
1208
1281
 
1209
1282
  ### Parameters
1210
1283
 
1211
- ### value
1212
-
1213
- `T`
1284
+ | Parameter | Type |
1285
+ | ------ | ------ |
1286
+ | `value` | `T` |
1214
1287
 
1215
1288
  ### Returns
1216
1289
 
@@ -1225,14 +1298,16 @@ function isNumber<T>(value): value is Extract<T, number>;
1225
1298
  ## Call Signature
1226
1299
 
1227
1300
  ```ts
1228
- function isObject(value): value is object;
1301
+ function isObject(value: unknown): value is object;
1229
1302
  ```
1230
1303
 
1231
- ### Parameters
1304
+ Type guard that checks whether a value is a plain object (not null and not an array).
1232
1305
 
1233
- ### value
1306
+ ### Parameters
1234
1307
 
1235
- `unknown`
1308
+ | Parameter | Type |
1309
+ | ------ | ------ |
1310
+ | `value` | `unknown` |
1236
1311
 
1237
1312
  ### Returns
1238
1313
 
@@ -1241,20 +1316,22 @@ function isObject(value): value is object;
1241
1316
  ## Call Signature
1242
1317
 
1243
1318
  ```ts
1244
- function isObject<T>(value): value is Extract<T, object>;
1319
+ function isObject<T>(value: T): value is Extract<T, object>;
1245
1320
  ```
1246
1321
 
1247
- ### Type Parameters
1322
+ Type guard that checks whether a value is a plain object (not null and not an array).
1248
1323
 
1249
- ### T
1324
+ ### Type Parameters
1250
1325
 
1251
- `T` *extends* `object`
1326
+ | Type Parameter |
1327
+ | ------ |
1328
+ | `T` *extends* `object` |
1252
1329
 
1253
1330
  ### Parameters
1254
1331
 
1255
- ### value
1256
-
1257
- `T`
1332
+ | Parameter | Type |
1333
+ | ------ | ------ |
1334
+ | `value` | `T` |
1258
1335
 
1259
1336
  ### Returns
1260
1337
 
@@ -1269,14 +1346,16 @@ function isObject<T>(value): value is Extract<T, object>;
1269
1346
  ## Call Signature
1270
1347
 
1271
1348
  ```ts
1272
- function isPopulatedArray(value): value is readonly unknown[];
1349
+ function isPopulatedArray(value: unknown): value is readonly unknown[];
1273
1350
  ```
1274
1351
 
1275
- ### Parameters
1352
+ Type guard that checks whether a value is a non-empty array.
1276
1353
 
1277
- ### value
1354
+ ### Parameters
1278
1355
 
1279
- `unknown`
1356
+ | Parameter | Type |
1357
+ | ------ | ------ |
1358
+ | `value` | `unknown` |
1280
1359
 
1281
1360
  ### Returns
1282
1361
 
@@ -1285,20 +1364,22 @@ function isPopulatedArray(value): value is readonly unknown[];
1285
1364
  ## Call Signature
1286
1365
 
1287
1366
  ```ts
1288
- function isPopulatedArray<T>(value): value is Extract<T, readonly unknown[]>;
1367
+ function isPopulatedArray<T>(value: T): value is Extract<T, readonly unknown[]>;
1289
1368
  ```
1290
1369
 
1291
- ### Type Parameters
1370
+ Type guard that checks whether a value is a non-empty array.
1292
1371
 
1293
- ### T
1372
+ ### Type Parameters
1294
1373
 
1295
- `T` *extends* `unknown`[]
1374
+ | Type Parameter |
1375
+ | ------ |
1376
+ | `T` *extends* `unknown`[] |
1296
1377
 
1297
1378
  ### Parameters
1298
1379
 
1299
- ### value
1300
-
1301
- `T`
1380
+ | Parameter | Type |
1381
+ | ------ | ------ |
1382
+ | `value` | `T` |
1302
1383
 
1303
1384
  ### Returns
1304
1385
 
@@ -1313,14 +1394,16 @@ function isPopulatedArray<T>(value): value is Extract<T, readonly unknown[]>;
1313
1394
  ## Call Signature
1314
1395
 
1315
1396
  ```ts
1316
- function isPromise(value): value is Promise<unknown>;
1397
+ function isPromise(value: unknown): value is Promise<unknown>;
1317
1398
  ```
1318
1399
 
1319
- ### Parameters
1400
+ Type guard that checks whether a value is a Promise instance.
1320
1401
 
1321
- ### value
1402
+ ### Parameters
1322
1403
 
1323
- `unknown`
1404
+ | Parameter | Type |
1405
+ | ------ | ------ |
1406
+ | `value` | `unknown` |
1324
1407
 
1325
1408
  ### Returns
1326
1409
 
@@ -1329,20 +1412,22 @@ function isPromise(value): value is Promise<unknown>;
1329
1412
  ## Call Signature
1330
1413
 
1331
1414
  ```ts
1332
- function isPromise<T>(value): value is Extract<T, Promise<unknown>>;
1415
+ function isPromise<T>(value: T): value is Extract<T, Promise<unknown>>;
1333
1416
  ```
1334
1417
 
1335
- ### Type Parameters
1418
+ Type guard that checks whether a value is a Promise instance.
1336
1419
 
1337
- ### T
1420
+ ### Type Parameters
1338
1421
 
1339
- `T`
1422
+ | Type Parameter |
1423
+ | ------ |
1424
+ | `T` |
1340
1425
 
1341
1426
  ### Parameters
1342
1427
 
1343
- ### value
1344
-
1345
- `T`
1428
+ | Parameter | Type |
1429
+ | ------ | ------ |
1430
+ | `value` | `T` |
1346
1431
 
1347
1432
  ### Returns
1348
1433
 
@@ -1357,14 +1442,16 @@ function isPromise<T>(value): value is Extract<T, Promise<unknown>>;
1357
1442
  ## Call Signature
1358
1443
 
1359
1444
  ```ts
1360
- function isPromiseLike(value): value is Promise<unknown>;
1445
+ function isPromiseLike(value: unknown): value is Promise<unknown>;
1361
1446
  ```
1362
1447
 
1363
- ### Parameters
1448
+ Type guard that checks whether a value is promise-like (has a `then` method).
1364
1449
 
1365
- ### value
1450
+ ### Parameters
1366
1451
 
1367
- `unknown`
1452
+ | Parameter | Type |
1453
+ | ------ | ------ |
1454
+ | `value` | `unknown` |
1368
1455
 
1369
1456
  ### Returns
1370
1457
 
@@ -1373,20 +1460,22 @@ function isPromiseLike(value): value is Promise<unknown>;
1373
1460
  ## Call Signature
1374
1461
 
1375
1462
  ```ts
1376
- function isPromiseLike<T>(value): value is Extract<T, Promise<unknown>>;
1463
+ function isPromiseLike<T>(value: T): value is Extract<T, Promise<unknown>>;
1377
1464
  ```
1378
1465
 
1379
- ### Type Parameters
1466
+ Type guard that checks whether a value is promise-like (has a `then` method).
1380
1467
 
1381
- ### T
1468
+ ### Type Parameters
1382
1469
 
1383
- `T`
1470
+ | Type Parameter |
1471
+ | ------ |
1472
+ | `T` |
1384
1473
 
1385
1474
  ### Parameters
1386
1475
 
1387
- ### value
1388
-
1389
- `T`
1476
+ | Parameter | Type |
1477
+ | ------ | ------ |
1478
+ | `value` | `T` |
1390
1479
 
1391
1480
  ### Returns
1392
1481
 
@@ -1401,14 +1490,16 @@ function isPromiseLike<T>(value): value is Extract<T, Promise<unknown>>;
1401
1490
  ## Call Signature
1402
1491
 
1403
1492
  ```ts
1404
- function isRegExp(value): value is RegExp;
1493
+ function isRegExp(value: unknown): value is RegExp;
1405
1494
  ```
1406
1495
 
1407
- ### Parameters
1496
+ Type guard that checks whether a value is a RegExp instance.
1408
1497
 
1409
- ### value
1498
+ ### Parameters
1410
1499
 
1411
- `unknown`
1500
+ | Parameter | Type |
1501
+ | ------ | ------ |
1502
+ | `value` | `unknown` |
1412
1503
 
1413
1504
  ### Returns
1414
1505
 
@@ -1417,20 +1508,22 @@ function isRegExp(value): value is RegExp;
1417
1508
  ## Call Signature
1418
1509
 
1419
1510
  ```ts
1420
- function isRegExp<T>(value): value is Extract<T, RegExp>;
1511
+ function isRegExp<T>(value: T): value is Extract<T, RegExp>;
1421
1512
  ```
1422
1513
 
1423
- ### Type Parameters
1514
+ Type guard that checks whether a value is a RegExp instance.
1424
1515
 
1425
- ### T
1516
+ ### Type Parameters
1426
1517
 
1427
- `T` *extends* `RegExp`
1518
+ | Type Parameter |
1519
+ | ------ |
1520
+ | `T` *extends* `RegExp` |
1428
1521
 
1429
1522
  ### Parameters
1430
1523
 
1431
- ### value
1432
-
1433
- `T`
1524
+ | Parameter | Type |
1525
+ | ------ | ------ |
1526
+ | `value` | `T` |
1434
1527
 
1435
1528
  ### Returns
1436
1529
 
@@ -1445,14 +1538,16 @@ function isRegExp<T>(value): value is Extract<T, RegExp>;
1445
1538
  ## Call Signature
1446
1539
 
1447
1540
  ```ts
1448
- function isSet(value): value is Set<unknown>;
1541
+ function isSet(value: unknown): value is Set<unknown>;
1449
1542
  ```
1450
1543
 
1544
+ Type guard that checks whether a value is a Set instance.
1545
+
1451
1546
  ### Parameters
1452
1547
 
1453
- ### value
1454
-
1455
- `unknown`
1548
+ | Parameter | Type |
1549
+ | ------ | ------ |
1550
+ | `value` | `unknown` |
1456
1551
 
1457
1552
  ### Returns
1458
1553
 
@@ -1461,20 +1556,22 @@ function isSet(value): value is Set<unknown>;
1461
1556
  ## Call Signature
1462
1557
 
1463
1558
  ```ts
1464
- function isSet<T>(value): value is Extract<T, Set<unknown>>;
1559
+ function isSet<T>(value: unknown): value is Extract<T, Set<unknown>>;
1465
1560
  ```
1466
1561
 
1467
- ### Type Parameters
1562
+ Type guard that checks whether a value is a Set instance.
1468
1563
 
1469
- ### T
1564
+ ### Type Parameters
1470
1565
 
1471
- `T` *extends* `Set`\<`unknown`\>
1566
+ | Type Parameter |
1567
+ | ------ |
1568
+ | `T` *extends* `Set`\<`unknown`\> |
1472
1569
 
1473
1570
  ### Parameters
1474
1571
 
1475
- ### value
1476
-
1477
- `unknown`
1572
+ | Parameter | Type |
1573
+ | ------ | ------ |
1574
+ | `value` | `unknown` |
1478
1575
 
1479
1576
  ### Returns
1480
1577
 
@@ -1489,14 +1586,16 @@ function isSet<T>(value): value is Extract<T, Set<unknown>>;
1489
1586
  ## Call Signature
1490
1587
 
1491
1588
  ```ts
1492
- function isString(value): value is string;
1589
+ function isString(value: unknown): value is string;
1493
1590
  ```
1494
1591
 
1495
- ### Parameters
1592
+ Type guard that checks whether a value is a string.
1496
1593
 
1497
- ### value
1594
+ ### Parameters
1498
1595
 
1499
- `unknown`
1596
+ | Parameter | Type |
1597
+ | ------ | ------ |
1598
+ | `value` | `unknown` |
1500
1599
 
1501
1600
  ### Returns
1502
1601
 
@@ -1505,20 +1604,22 @@ function isString(value): value is string;
1505
1604
  ## Call Signature
1506
1605
 
1507
1606
  ```ts
1508
- function isString<T>(value): value is Extract<T, string>;
1607
+ function isString<T>(value: T): value is Extract<T, string>;
1509
1608
  ```
1510
1609
 
1511
- ### Type Parameters
1610
+ Type guard that checks whether a value is a string.
1512
1611
 
1513
- ### T
1612
+ ### Type Parameters
1514
1613
 
1515
- `T` *extends* `string`
1614
+ | Type Parameter |
1615
+ | ------ |
1616
+ | `T` *extends* `string` |
1516
1617
 
1517
1618
  ### Parameters
1518
1619
 
1519
- ### value
1520
-
1521
- `T`
1620
+ | Parameter | Type |
1621
+ | ------ | ------ |
1622
+ | `value` | `T` |
1522
1623
 
1523
1624
  ### Returns
1524
1625
 
@@ -1533,14 +1634,16 @@ function isString<T>(value): value is Extract<T, string>;
1533
1634
  ## Call Signature
1534
1635
 
1535
1636
  ```ts
1536
- function isSymbol(value): value is symbol;
1637
+ function isSymbol(value: unknown): value is symbol;
1537
1638
  ```
1538
1639
 
1640
+ Type guard that checks whether a value is a symbol.
1641
+
1539
1642
  ### Parameters
1540
1643
 
1541
- ### value
1542
-
1543
- `unknown`
1644
+ | Parameter | Type |
1645
+ | ------ | ------ |
1646
+ | `value` | `unknown` |
1544
1647
 
1545
1648
  ### Returns
1546
1649
 
@@ -1549,20 +1652,22 @@ function isSymbol(value): value is symbol;
1549
1652
  ## Call Signature
1550
1653
 
1551
1654
  ```ts
1552
- function isSymbol<T>(value): value is Extract<T, symbol>;
1655
+ function isSymbol<T>(value: T): value is Extract<T, symbol>;
1553
1656
  ```
1554
1657
 
1555
- ### Type Parameters
1658
+ Type guard that checks whether a value is a symbol.
1556
1659
 
1557
- ### T
1660
+ ### Type Parameters
1558
1661
 
1559
- `T` *extends* `symbol`
1662
+ | Type Parameter |
1663
+ | ------ |
1664
+ | `T` *extends* `symbol` |
1560
1665
 
1561
1666
  ### Parameters
1562
1667
 
1563
- ### value
1564
-
1565
- `T`
1668
+ | Parameter | Type |
1669
+ | ------ | ------ |
1670
+ | `value` | `T` |
1566
1671
 
1567
1672
  ### Returns
1568
1673
 
@@ -1577,20 +1682,22 @@ function isSymbol<T>(value): value is Extract<T, symbol>;
1577
1682
  ## Call Signature
1578
1683
 
1579
1684
  ```ts
1580
- function isTruthy<T>(value): value is Exclude<T, false | "" | 0 | 0n | null | undefined>;
1685
+ function isTruthy<T>(value: T): value is Exclude<T, false | "" | 0 | 0n | null | undefined>;
1581
1686
  ```
1582
1687
 
1583
- ### Type Parameters
1688
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1584
1689
 
1585
- ### T
1690
+ ### Type Parameters
1586
1691
 
1587
- `T`
1692
+ | Type Parameter |
1693
+ | ------ |
1694
+ | `T` |
1588
1695
 
1589
1696
  ### Parameters
1590
1697
 
1591
- ### value
1592
-
1593
- `T`
1698
+ | Parameter | Type |
1699
+ | ------ | ------ |
1700
+ | `value` | `T` |
1594
1701
 
1595
1702
  ### Returns
1596
1703
 
@@ -1599,20 +1706,22 @@ value is Exclude\<T, false \| "" \| 0 \| 0n \| null \| undefined\>
1599
1706
  ## Call Signature
1600
1707
 
1601
1708
  ```ts
1602
- function isTruthy<T>(value): value is Extract<T, true>;
1709
+ function isTruthy<T>(value: T): value is Extract<T, true>;
1603
1710
  ```
1604
1711
 
1605
- ### Type Parameters
1712
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1606
1713
 
1607
- ### T
1714
+ ### Type Parameters
1608
1715
 
1609
- `T` *extends* `boolean`
1716
+ | Type Parameter |
1717
+ | ------ |
1718
+ | `T` *extends* `boolean` |
1610
1719
 
1611
1720
  ### Parameters
1612
1721
 
1613
- ### value
1614
-
1615
- `T`
1722
+ | Parameter | Type |
1723
+ | ------ | ------ |
1724
+ | `value` | `T` |
1616
1725
 
1617
1726
  ### Returns
1618
1727
 
@@ -1621,20 +1730,22 @@ function isTruthy<T>(value): value is Extract<T, true>;
1621
1730
  ## Call Signature
1622
1731
 
1623
1732
  ```ts
1624
- function isTruthy<T>(value): value is Extract<T, number>;
1733
+ function isTruthy<T>(value: T): value is Extract<T, number>;
1625
1734
  ```
1626
1735
 
1627
- ### Type Parameters
1736
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1628
1737
 
1629
- ### T
1738
+ ### Type Parameters
1630
1739
 
1631
- `T` *extends* `number`
1740
+ | Type Parameter |
1741
+ | ------ |
1742
+ | `T` *extends* `number` |
1632
1743
 
1633
1744
  ### Parameters
1634
1745
 
1635
- ### value
1636
-
1637
- `T`
1746
+ | Parameter | Type |
1747
+ | ------ | ------ |
1748
+ | `value` | `T` |
1638
1749
 
1639
1750
  ### Returns
1640
1751
 
@@ -1643,20 +1754,22 @@ function isTruthy<T>(value): value is Extract<T, number>;
1643
1754
  ## Call Signature
1644
1755
 
1645
1756
  ```ts
1646
- function isTruthy<T>(value): value is Extract<T, bigint>;
1757
+ function isTruthy<T>(value: T): value is Extract<T, bigint>;
1647
1758
  ```
1648
1759
 
1649
- ### Type Parameters
1760
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1650
1761
 
1651
- ### T
1762
+ ### Type Parameters
1652
1763
 
1653
- `T` *extends* `bigint`
1764
+ | Type Parameter |
1765
+ | ------ |
1766
+ | `T` *extends* `bigint` |
1654
1767
 
1655
1768
  ### Parameters
1656
1769
 
1657
- ### value
1658
-
1659
- `T`
1770
+ | Parameter | Type |
1771
+ | ------ | ------ |
1772
+ | `value` | `T` |
1660
1773
 
1661
1774
  ### Returns
1662
1775
 
@@ -1665,20 +1778,22 @@ function isTruthy<T>(value): value is Extract<T, bigint>;
1665
1778
  ## Call Signature
1666
1779
 
1667
1780
  ```ts
1668
- function isTruthy<T>(value): value is Extract<T, null>;
1781
+ function isTruthy<T>(value: T): value is Extract<T, null>;
1669
1782
  ```
1670
1783
 
1671
- ### Type Parameters
1784
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1672
1785
 
1673
- ### T
1786
+ ### Type Parameters
1674
1787
 
1675
- `T` *extends* `null`
1788
+ | Type Parameter |
1789
+ | ------ |
1790
+ | `T` *extends* `null` |
1676
1791
 
1677
1792
  ### Parameters
1678
1793
 
1679
- ### value
1680
-
1681
- `T`
1794
+ | Parameter | Type |
1795
+ | ------ | ------ |
1796
+ | `value` | `T` |
1682
1797
 
1683
1798
  ### Returns
1684
1799
 
@@ -1687,20 +1802,22 @@ function isTruthy<T>(value): value is Extract<T, null>;
1687
1802
  ## Call Signature
1688
1803
 
1689
1804
  ```ts
1690
- function isTruthy<T>(value): value is Extract<T, undefined>;
1805
+ function isTruthy<T>(value: T): value is Extract<T, undefined>;
1691
1806
  ```
1692
1807
 
1693
- ### Type Parameters
1808
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1694
1809
 
1695
- ### T
1810
+ ### Type Parameters
1696
1811
 
1697
- `T` *extends* `undefined`
1812
+ | Type Parameter |
1813
+ | ------ |
1814
+ | `T` *extends* `undefined` |
1698
1815
 
1699
1816
  ### Parameters
1700
1817
 
1701
- ### value
1702
-
1703
- `T`
1818
+ | Parameter | Type |
1819
+ | ------ | ------ |
1820
+ | `value` | `T` |
1704
1821
 
1705
1822
  ### Returns
1706
1823
 
@@ -1709,20 +1826,22 @@ function isTruthy<T>(value): value is Extract<T, undefined>;
1709
1826
  ## Call Signature
1710
1827
 
1711
1828
  ```ts
1712
- function isTruthy<T>(value): value is Extract<T, string>;
1829
+ function isTruthy<T>(value: T): value is Extract<T, string>;
1713
1830
  ```
1714
1831
 
1715
- ### Type Parameters
1832
+ Type guard that checks whether a value is truthy (not 0, null, undefined, false, '', or 0n).
1716
1833
 
1717
- ### T
1834
+ ### Type Parameters
1718
1835
 
1719
- `T` *extends* `string`
1836
+ | Type Parameter |
1837
+ | ------ |
1838
+ | `T` *extends* `string` |
1720
1839
 
1721
1840
  ### Parameters
1722
1841
 
1723
- ### value
1724
-
1725
- `T`
1842
+ | Parameter | Type |
1843
+ | ------ | ------ |
1844
+ | `value` | `T` |
1726
1845
 
1727
1846
  ### Returns
1728
1847
 
@@ -1735,23 +1854,24 @@ function isTruthy<T>(value): value is Extract<T, string>;
1735
1854
  ***
1736
1855
 
1737
1856
  ```ts
1738
- function isType(value, expectedType): boolean;
1857
+ function isType(value: unknown, expectedType: FieldType): boolean;
1739
1858
  ```
1740
1859
 
1741
- ## Parameters
1742
-
1743
- ### value
1860
+ Checks whether a value matches the expected field type, with correct handling for arrays and nulls.
1744
1861
 
1745
- `unknown`
1746
-
1747
- ### expectedType
1862
+ ## Parameters
1748
1863
 
1749
- [`FieldType`](#../type-aliases/FieldType)
1864
+ | Parameter | Type | Description |
1865
+ | ------ | ------ | ------ |
1866
+ | `value` | `unknown` | The value to check. |
1867
+ | `expectedType` | [`FieldType`](#../type-aliases/FieldType) | The expected type string. |
1750
1868
 
1751
1869
  ## Returns
1752
1870
 
1753
1871
  `boolean`
1754
1872
 
1873
+ True if the value matches the expected type.
1874
+
1755
1875
  ### <a id="isTypedArray"></a>isTypedArray
1756
1876
 
1757
1877
  [**@xylabs/typeof**](#../README)
@@ -1759,19 +1879,23 @@ function isType(value, expectedType): boolean;
1759
1879
  ***
1760
1880
 
1761
1881
  ```ts
1762
- function isTypedArray(value): value is TypedArray;
1882
+ function isTypedArray(value: unknown): value is TypedArray;
1763
1883
  ```
1764
1884
 
1765
- ## Parameters
1885
+ Type guard that checks whether a value is a TypedArray (an array where every element is a TypedValue).
1766
1886
 
1767
- ### value
1887
+ ## Parameters
1768
1888
 
1769
- `unknown`
1889
+ | Parameter | Type | Description |
1890
+ | ------ | ------ | ------ |
1891
+ | `value` | `unknown` | The value to check. |
1770
1892
 
1771
1893
  ## Returns
1772
1894
 
1773
1895
  `value is TypedArray`
1774
1896
 
1897
+ True if the value is an array of TypedValue elements.
1898
+
1775
1899
  ### <a id="isTypedKey"></a>isTypedKey
1776
1900
 
1777
1901
  [**@xylabs/typeof**](#../README)
@@ -1779,19 +1903,23 @@ function isTypedArray(value): value is TypedArray;
1779
1903
  ***
1780
1904
 
1781
1905
  ```ts
1782
- function isTypedKey(value): value is string | number | symbol;
1906
+ function isTypedKey(value: unknown): value is string | number | symbol;
1783
1907
  ```
1784
1908
 
1785
- ## Parameters
1909
+ Type guard that checks whether a value is a valid TypedKey (string, bigint, number, or symbol).
1786
1910
 
1787
- ### value
1911
+ ## Parameters
1788
1912
 
1789
- `unknown`
1913
+ | Parameter | Type | Description |
1914
+ | ------ | ------ | ------ |
1915
+ | `value` | `unknown` | The value to check. |
1790
1916
 
1791
1917
  ## Returns
1792
1918
 
1793
1919
  value is string \| number \| symbol
1794
1920
 
1921
+ True if the value is a valid TypedKey.
1922
+
1795
1923
  ### <a id="isTypedObject"></a>isTypedObject
1796
1924
 
1797
1925
  [**@xylabs/typeof**](#../README)
@@ -1799,19 +1927,23 @@ value is string \| number \| symbol
1799
1927
  ***
1800
1928
 
1801
1929
  ```ts
1802
- function isTypedObject(value): value is TypedObject;
1930
+ function isTypedObject(value: unknown): value is TypedObject;
1803
1931
  ```
1804
1932
 
1933
+ Type guard that checks whether a value is a TypedObject (an object with TypedKey keys and TypedValue values).
1934
+
1805
1935
  ## Parameters
1806
1936
 
1807
- ### value
1808
-
1809
- `unknown`
1937
+ | Parameter | Type | Description |
1938
+ | ------ | ------ | ------ |
1939
+ | `value` | `unknown` | The value to check. |
1810
1940
 
1811
1941
  ## Returns
1812
1942
 
1813
1943
  `value is TypedObject`
1814
1944
 
1945
+ True if the value is a valid TypedObject.
1946
+
1815
1947
  ### <a id="isTypedValue"></a>isTypedValue
1816
1948
 
1817
1949
  [**@xylabs/typeof**](#../README)
@@ -1819,19 +1951,23 @@ function isTypedObject(value): value is TypedObject;
1819
1951
  ***
1820
1952
 
1821
1953
  ```ts
1822
- function isTypedValue(value): value is TypedValue;
1954
+ function isTypedValue(value: unknown): value is TypedValue;
1823
1955
  ```
1824
1956
 
1825
- ## Parameters
1957
+ Type guard that checks whether a value is a valid TypedValue.
1826
1958
 
1827
- ### value
1959
+ ## Parameters
1828
1960
 
1829
- `unknown`
1961
+ | Parameter | Type | Description |
1962
+ | ------ | ------ | ------ |
1963
+ | `value` | `unknown` | The value to check. |
1830
1964
 
1831
1965
  ## Returns
1832
1966
 
1833
1967
  `value is TypedValue`
1834
1968
 
1969
+ True if the value is a string, number, boolean, null, TypedObject, or TypedArray.
1970
+
1835
1971
  ### <a id="isUndefined"></a>isUndefined
1836
1972
 
1837
1973
  [**@xylabs/typeof**](#../README)
@@ -1841,14 +1977,16 @@ function isTypedValue(value): value is TypedValue;
1841
1977
  ## Call Signature
1842
1978
 
1843
1979
  ```ts
1844
- function isUndefined(value): value is undefined;
1980
+ function isUndefined(value: unknown): value is undefined;
1845
1981
  ```
1846
1982
 
1983
+ Type guard that checks whether a value is undefined.
1984
+
1847
1985
  ### Parameters
1848
1986
 
1849
- ### value
1850
-
1851
- `unknown`
1987
+ | Parameter | Type |
1988
+ | ------ | ------ |
1989
+ | `value` | `unknown` |
1852
1990
 
1853
1991
  ### Returns
1854
1992
 
@@ -1857,20 +1995,22 @@ function isUndefined(value): value is undefined;
1857
1995
  ## Call Signature
1858
1996
 
1859
1997
  ```ts
1860
- function isUndefined<T>(value): value is Extract<T, undefined>;
1998
+ function isUndefined<T>(value: T): value is Extract<T, undefined>;
1861
1999
  ```
1862
2000
 
1863
- ### Type Parameters
2001
+ Type guard that checks whether a value is undefined.
1864
2002
 
1865
- ### T
2003
+ ### Type Parameters
1866
2004
 
1867
- `T`
2005
+ | Type Parameter |
2006
+ | ------ |
2007
+ | `T` |
1868
2008
 
1869
2009
  ### Parameters
1870
2010
 
1871
- ### value
1872
-
1873
- `T`
2011
+ | Parameter | Type |
2012
+ | ------ | ------ |
2013
+ | `value` | `T` |
1874
2014
 
1875
2015
  ### Returns
1876
2016
 
@@ -1885,14 +2025,16 @@ function isUndefined<T>(value): value is Extract<T, undefined>;
1885
2025
  ## Call Signature
1886
2026
 
1887
2027
  ```ts
1888
- function isUndefinedOrNull(value): value is null | undefined;
2028
+ function isUndefinedOrNull(value: unknown): value is null | undefined;
1889
2029
  ```
1890
2030
 
1891
- ### Parameters
2031
+ Type guard that checks whether a value is undefined or null.
1892
2032
 
1893
- ### value
2033
+ ### Parameters
1894
2034
 
1895
- `unknown`
2035
+ | Parameter | Type |
2036
+ | ------ | ------ |
2037
+ | `value` | `unknown` |
1896
2038
 
1897
2039
  ### Returns
1898
2040
 
@@ -1901,20 +2043,22 @@ value is null \| undefined
1901
2043
  ## Call Signature
1902
2044
 
1903
2045
  ```ts
1904
- function isUndefinedOrNull<T>(value): value is Extract<T, null | undefined>;
2046
+ function isUndefinedOrNull<T>(value: T): value is Extract<T, null | undefined>;
1905
2047
  ```
1906
2048
 
1907
- ### Type Parameters
2049
+ Type guard that checks whether a value is undefined or null.
1908
2050
 
1909
- ### T
2051
+ ### Type Parameters
1910
2052
 
1911
- `T`
2053
+ | Type Parameter |
2054
+ | ------ |
2055
+ | `T` |
1912
2056
 
1913
2057
  ### Parameters
1914
2058
 
1915
- ### value
1916
-
1917
- `T`
2059
+ | Parameter | Type |
2060
+ | ------ | ------ |
2061
+ | `value` | `T` |
1918
2062
 
1919
2063
  ### Returns
1920
2064
 
@@ -1927,19 +2071,23 @@ value is Extract\<T, null \| undefined\>
1927
2071
  ***
1928
2072
 
1929
2073
  ```ts
1930
- function isValidTypedFieldPair(pair): pair is [key: string | number | symbol, value: TypedValue];
2074
+ function isValidTypedFieldPair(pair: [unknown, unknown]): pair is [key: string | number | symbol, value: TypedValue];
1931
2075
  ```
1932
2076
 
1933
- ## Parameters
2077
+ Type guard that checks whether a key-value pair has a valid TypedKey and TypedValue.
1934
2078
 
1935
- ### pair
2079
+ ## Parameters
1936
2080
 
1937
- \[`unknown`, `unknown`\]
2081
+ | Parameter | Type | Description |
2082
+ | ------ | ------ | ------ |
2083
+ | `pair` | \[`unknown`, `unknown`\] | A tuple of [key, value] to validate. |
1938
2084
 
1939
2085
  ## Returns
1940
2086
 
1941
2087
  pair is \[key: string \| number \| symbol, value: TypedValue\]
1942
2088
 
2089
+ True if the key is a TypedKey and the value is a TypedValue.
2090
+
1943
2091
  ### <a id="isWeakMap"></a>isWeakMap
1944
2092
 
1945
2093
  [**@xylabs/typeof**](#../README)
@@ -1949,14 +2097,16 @@ pair is \[key: string \| number \| symbol, value: TypedValue\]
1949
2097
  ## Call Signature
1950
2098
 
1951
2099
  ```ts
1952
- function isWeakMap(value): value is WeakMap<WeakKey, unknown>;
2100
+ function isWeakMap(value: unknown): value is WeakMap<WeakKey, unknown>;
1953
2101
  ```
1954
2102
 
2103
+ Type guard that checks whether a value is a WeakMap instance.
2104
+
1955
2105
  ### Parameters
1956
2106
 
1957
- ### value
1958
-
1959
- `unknown`
2107
+ | Parameter | Type |
2108
+ | ------ | ------ |
2109
+ | `value` | `unknown` |
1960
2110
 
1961
2111
  ### Returns
1962
2112
 
@@ -1965,28 +2115,24 @@ function isWeakMap(value): value is WeakMap<WeakKey, unknown>;
1965
2115
  ## Call Signature
1966
2116
 
1967
2117
  ```ts
1968
- function isWeakMap<K, V, T>(value): value is Extract<T, WeakMap<K, V>>;
2118
+ function isWeakMap<K, V, T>(value: T): value is Extract<T, WeakMap<K, V>>;
1969
2119
  ```
1970
2120
 
1971
- ### Type Parameters
1972
-
1973
- ### K
1974
-
1975
- `K` *extends* `WeakKey`
1976
-
1977
- ### V
2121
+ Type guard that checks whether a value is a WeakMap instance.
1978
2122
 
1979
- `V`
1980
-
1981
- ### T
2123
+ ### Type Parameters
1982
2124
 
1983
- `T` *extends* `WeakMap`\<`K`, `V`\>
2125
+ | Type Parameter |
2126
+ | ------ |
2127
+ | `K` *extends* `WeakKey` |
2128
+ | `V` |
2129
+ | `T` *extends* `WeakMap`\<`K`, `V`\> |
1984
2130
 
1985
2131
  ### Parameters
1986
2132
 
1987
- ### value
1988
-
1989
- `T`
2133
+ | Parameter | Type |
2134
+ | ------ | ------ |
2135
+ | `value` | `T` |
1990
2136
 
1991
2137
  ### Returns
1992
2138
 
@@ -2001,14 +2147,16 @@ function isWeakMap<K, V, T>(value): value is Extract<T, WeakMap<K, V>>;
2001
2147
  ## Call Signature
2002
2148
 
2003
2149
  ```ts
2004
- function isWeakSet(value): value is WeakSet<WeakKey>;
2150
+ function isWeakSet(value: unknown): value is WeakSet<WeakKey>;
2005
2151
  ```
2006
2152
 
2007
- ### Parameters
2153
+ Type guard that checks whether a value is a WeakSet instance.
2008
2154
 
2009
- ### value
2155
+ ### Parameters
2010
2156
 
2011
- `unknown`
2157
+ | Parameter | Type |
2158
+ | ------ | ------ |
2159
+ | `value` | `unknown` |
2012
2160
 
2013
2161
  ### Returns
2014
2162
 
@@ -2017,24 +2165,23 @@ function isWeakSet(value): value is WeakSet<WeakKey>;
2017
2165
  ## Call Signature
2018
2166
 
2019
2167
  ```ts
2020
- function isWeakSet<K, T>(value): value is Extract<T, WeakSet<K>>;
2168
+ function isWeakSet<K, T>(value: T): value is Extract<T, WeakSet<K>>;
2021
2169
  ```
2022
2170
 
2023
- ### Type Parameters
2024
-
2025
- ### K
2171
+ Type guard that checks whether a value is a WeakSet instance.
2026
2172
 
2027
- `K` *extends* `WeakKey`
2028
-
2029
- ### T
2173
+ ### Type Parameters
2030
2174
 
2031
- `T` *extends* `WeakSet`\<`K`\>
2175
+ | Type Parameter |
2176
+ | ------ |
2177
+ | `K` *extends* `WeakKey` |
2178
+ | `T` *extends* `WeakSet`\<`K`\> |
2032
2179
 
2033
2180
  ### Parameters
2034
2181
 
2035
- ### value
2036
-
2037
- `T`
2182
+ | Parameter | Type |
2183
+ | ------ | ------ |
2184
+ | `value` | `T` |
2038
2185
 
2039
2186
  ### Returns
2040
2187
 
@@ -2047,25 +2194,29 @@ function isWeakSet<K, T>(value): value is Extract<T, WeakSet<K>>;
2047
2194
  ***
2048
2195
 
2049
2196
  ```ts
2050
- function typeOf<T>(item): TypeOfTypes;
2197
+ function typeOf<T>(item: T): TypeOfTypes;
2051
2198
  ```
2052
2199
 
2053
- ## Type Parameters
2200
+ Extended typeof that distinguishes arrays from objects (unlike native `typeof`).
2054
2201
 
2055
- ### T
2202
+ ## Type Parameters
2056
2203
 
2057
- `T`
2204
+ | Type Parameter |
2205
+ | ------ |
2206
+ | `T` |
2058
2207
 
2059
2208
  ## Parameters
2060
2209
 
2061
- ### item
2062
-
2063
- `T`
2210
+ | Parameter | Type | Description |
2211
+ | ------ | ------ | ------ |
2212
+ | `item` | `T` | The value to check. |
2064
2213
 
2065
2214
  ## Returns
2066
2215
 
2067
2216
  [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
2068
2217
 
2218
+ The type of the item as a TypeOfTypes string.
2219
+
2069
2220
  ### <a id="validateType"></a>validateType
2070
2221
 
2071
2222
  [**@xylabs/typeof**](#../README)
@@ -2074,35 +2225,33 @@ function typeOf<T>(item): TypeOfTypes;
2074
2225
 
2075
2226
  ```ts
2076
2227
  function validateType<T>(
2077
- typeName,
2078
- value,
2079
- optional?): [T | undefined, Error[]];
2228
+ typeName: TypeOfTypes,
2229
+ value: T,
2230
+ optional?: boolean): [T | undefined, Error[]];
2080
2231
  ```
2081
2232
 
2082
- ## Type Parameters
2233
+ Validates that a value matches the expected type, returning the value and any errors.
2083
2234
 
2084
- ### T
2235
+ ## Type Parameters
2085
2236
 
2086
- `T`
2237
+ | Type Parameter |
2238
+ | ------ |
2239
+ | `T` |
2087
2240
 
2088
2241
  ## Parameters
2089
2242
 
2090
- ### typeName
2091
-
2092
- [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
2093
-
2094
- ### value
2095
-
2096
- `T`
2097
-
2098
- ### optional?
2099
-
2100
- `boolean` = `false`
2243
+ | Parameter | Type | Default value | Description |
2244
+ | ------ | ------ | ------ | ------ |
2245
+ | `typeName` | [`TypeOfTypes`](#../type-aliases/TypeOfTypes) | `undefined` | The expected type name. |
2246
+ | `value` | `T` | `undefined` | The value to validate. |
2247
+ | `optional` | `boolean` | `false` | If true, undefined values are accepted without error. |
2101
2248
 
2102
2249
  ## Returns
2103
2250
 
2104
2251
  \[`T` \| `undefined`, `Error`[]\]
2105
2252
 
2253
+ A tuple of [value or undefined, array of errors].
2254
+
2106
2255
  ### type-aliases
2107
2256
 
2108
2257
  ### <a id="AnyFunction"></a>AnyFunction
@@ -2112,14 +2261,16 @@ function validateType<T>(
2112
2261
  ***
2113
2262
 
2114
2263
  ```ts
2115
- type AnyFunction = (...args) => unknown;
2264
+ type AnyFunction = (...args: unknown[]) => unknown;
2116
2265
  ```
2117
2266
 
2118
- ## Parameters
2267
+ A function type that accepts any arguments and returns unknown.
2119
2268
 
2120
- ### args
2269
+ ## Parameters
2121
2270
 
2122
- ...`unknown`[]
2271
+ | Parameter | Type |
2272
+ | ------ | ------ |
2273
+ | ...`args` | `unknown`[] |
2123
2274
 
2124
2275
  ## Returns
2125
2276
 
@@ -2135,15 +2286,14 @@ type AnyFunction = (...args) => unknown;
2135
2286
  type Brand<T, B> = T & { [K in keyof B]: B[K] };
2136
2287
  ```
2137
2288
 
2138
- ## Type Parameters
2139
-
2140
- ### T
2289
+ Creates a branded type by intersecting base type T with brand type B, enabling nominal typing in TypeScript.
2141
2290
 
2142
- `T`
2143
-
2144
- ### B
2291
+ ## Type Parameters
2145
2292
 
2146
- `B`
2293
+ | Type Parameter |
2294
+ | ------ |
2295
+ | `T` |
2296
+ | `B` |
2147
2297
 
2148
2298
  ### <a id="FieldType"></a>FieldType
2149
2299
 
@@ -2163,6 +2313,8 @@ type FieldType =
2163
2313
  | "function";
2164
2314
  ```
2165
2315
 
2316
+ Union of string literals representing the possible types of an object field.
2317
+
2166
2318
  ### <a id="IdentityFunction"></a>IdentityFunction
2167
2319
 
2168
2320
  [**@xylabs/typeof**](#../README)
@@ -2170,20 +2322,22 @@ type FieldType =
2170
2322
  ***
2171
2323
 
2172
2324
  ```ts
2173
- type IdentityFunction<T> = (value) => value is T;
2325
+ type IdentityFunction<T> = (value: unknown) => value is T;
2174
2326
  ```
2175
2327
 
2176
- ## Type Parameters
2328
+ A type guard function that narrows an unknown value to type T.
2177
2329
 
2178
- ### T
2330
+ ## Type Parameters
2179
2331
 
2180
- `T`
2332
+ | Type Parameter |
2333
+ | ------ |
2334
+ | `T` |
2181
2335
 
2182
2336
  ## Parameters
2183
2337
 
2184
- ### value
2185
-
2186
- `unknown`
2338
+ | Parameter | Type |
2339
+ | ------ | ------ |
2340
+ | `value` | `unknown` |
2187
2341
 
2188
2342
  ## Returns
2189
2343
 
@@ -2199,6 +2353,8 @@ type IdentityFunction<T> = (value) => value is T;
2199
2353
  type ObjectTypeShape = Record<string | number | symbol, FieldType>;
2200
2354
  ```
2201
2355
 
2356
+ Describes the expected shape of an object by mapping each key to its expected field type.
2357
+
2202
2358
  ### <a id="RecordKey"></a>RecordKey
2203
2359
 
2204
2360
  [**@xylabs/typeof**](#../README)
@@ -2209,6 +2365,8 @@ type ObjectTypeShape = Record<string | number | symbol, FieldType>;
2209
2365
  type RecordKey = string | number | symbol;
2210
2366
  ```
2211
2367
 
2368
+ A union of valid object key types.
2369
+
2212
2370
  ### <a id="TypeOfTypes"></a>TypeOfTypes
2213
2371
 
2214
2372
  [**@xylabs/typeof**](#../README)
@@ -2230,6 +2388,8 @@ type TypeOfTypes =
2230
2388
  | "symbol";
2231
2389
  ```
2232
2390
 
2391
+ Union of string literals representing the possible results of the extended `typeOf` function.
2392
+
2233
2393
  ### <a id="TypedArray"></a>TypedArray
2234
2394
 
2235
2395
  [**@xylabs/typeof**](#../README)
@@ -2240,6 +2400,8 @@ type TypeOfTypes =
2240
2400
  type TypedArray = TypedValue[];
2241
2401
  ```
2242
2402
 
2403
+ An array of TypedValue elements.
2404
+
2243
2405
  ### <a id="TypedKey"></a>TypedKey
2244
2406
 
2245
2407
  [**@xylabs/typeof**](#../README)
@@ -2250,11 +2412,13 @@ type TypedArray = TypedValue[];
2250
2412
  type TypedKey<T> = T extends string ? T : string | number | symbol;
2251
2413
  ```
2252
2414
 
2253
- ## Type Parameters
2415
+ A valid key for a typed object. Defaults to string | number | symbol unless narrowed by T.
2254
2416
 
2255
- ### T
2417
+ ## Type Parameters
2256
2418
 
2257
- `T` *extends* `string` \| `void` = `void`
2419
+ | Type Parameter | Default type |
2420
+ | ------ | ------ |
2421
+ | `T` *extends* `string` \| `void` | `void` |
2258
2422
 
2259
2423
  ### <a id="TypedObject"></a>TypedObject
2260
2424
 
@@ -2270,6 +2434,8 @@ type TypedObject =
2270
2434
  | object;
2271
2435
  ```
2272
2436
 
2437
+ An object whose keys are TypedKey and whose values are TypedValue.
2438
+
2273
2439
  ### <a id="TypedValue"></a>TypedValue
2274
2440
 
2275
2441
  [**@xylabs/typeof**](#../README)
@@ -2290,6 +2456,8 @@ type TypedValue =
2290
2456
  | undefined;
2291
2457
  ```
2292
2458
 
2459
+ A value that can appear in a typed object tree (primitives, objects, arrays, functions, and symbols).
2460
+
2293
2461
 
2294
2462
  Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
2295
2463