@pawover/kit 0.0.0-beta.41 → 0.0.0-beta.43

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.
Files changed (44) hide show
  1. package/dist/enums.d.ts +1 -1
  2. package/dist/enums.js +144 -2
  3. package/dist/enums.js.map +1 -0
  4. package/dist/{except-MacUK44u.d.ts → except-6l9Qdmn1.d.ts} +53 -38
  5. package/dist/except-6l9Qdmn1.d.ts.map +1 -0
  6. package/dist/hooks-alova.d.ts.map +1 -1
  7. package/dist/hooks-alova.js +1 -4
  8. package/dist/hooks-alova.js.map +1 -1
  9. package/dist/hooks-react.d.ts +43 -12
  10. package/dist/hooks-react.d.ts.map +1 -1
  11. package/dist/hooks-react.js +52 -49
  12. package/dist/hooks-react.js.map +1 -1
  13. package/dist/{index-DBPmnr4a.d.ts → index-D0_YLsqN.d.ts} +2 -5
  14. package/dist/index-D0_YLsqN.d.ts.map +1 -0
  15. package/dist/index-JKtXbRi8.d.ts +149 -0
  16. package/dist/index-JKtXbRi8.d.ts.map +1 -0
  17. package/dist/index.d.ts +400 -111
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +2 -3
  20. package/dist/patches-fetchEventSource.d.ts +2 -2
  21. package/dist/patches-fetchEventSource.d.ts.map +1 -1
  22. package/dist/patches-fetchEventSource.js +2 -4
  23. package/dist/patches-fetchEventSource.js.map +1 -1
  24. package/dist/{utils-_dtCs-qa.js → utils-DvWLCdYR.js} +282 -356
  25. package/dist/utils-DvWLCdYR.js.map +1 -0
  26. package/dist/{value-of-DUmTbnuw.d.ts → value-of-Dz22arsm.d.ts} +2 -2
  27. package/dist/value-of-Dz22arsm.d.ts.map +1 -0
  28. package/dist/vite.d.ts +0 -1
  29. package/dist/vite.d.ts.map +1 -1
  30. package/dist/vite.js +2 -2
  31. package/dist/vite.js.map +1 -1
  32. package/dist/zod.d.ts.map +1 -1
  33. package/dist/zod.js +31 -69
  34. package/dist/zod.js.map +1 -1
  35. package/metadata.json +0 -3
  36. package/package.json +18 -12
  37. package/dist/enums-BL6w5-mS.js +0 -148
  38. package/dist/enums-BL6w5-mS.js.map +0 -1
  39. package/dist/except-MacUK44u.d.ts.map +0 -1
  40. package/dist/index-Bn_PNnsM.d.ts +0 -212
  41. package/dist/index-Bn_PNnsM.d.ts.map +0 -1
  42. package/dist/index-DBPmnr4a.d.ts.map +0 -1
  43. package/dist/utils-_dtCs-qa.js.map +0 -1
  44. package/dist/value-of-DUmTbnuw.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { a as Simplify, c as Not, d as IsNever, f as OptionalKeysOf, i as HomomorphicPick, l as UnknownArray, m as UnionToIntersection, n as ApplyDefaultOptions, o as IfNotAnyOrNever, p as IsAny, r as CollapseLiterals, s as IsExactOptionalPropertyTypesEnabled, t as Except, u as If } from "./except-MacUK44u.js";
2
- import { t as ValueOf } from "./value-of-DUmTbnuw.js";
3
- import { a as AnyObject, i as AnyGeneratorFunction, n as AnyAsyncGeneratorFunction, o as PlainObject, r as AnyFunction, s as TreeLike, t as AnyAsyncFunction } from "./index-DBPmnr4a.js";
4
- import { clone, cloneDeep, cloneDeepWith } from "lodash-es";
1
+ import { a as IsEqual, c as IsExactOptionalPropertyTypesEnabled, d as If, f as IsNever, h as UnionToIntersection, i as HomomorphicPick, l as Not, m as IsAny, n as ApplyDefaultOptions, o as Simplify, p as OptionalKeysOf, r as CollapseLiterals, s as IfNotAnyOrNever, t as Except, u as UnknownArray } from "./except-6l9Qdmn1.js";
2
+ import { t as ValueOf } from "./value-of-Dz22arsm.js";
3
+ import { a as AnyObject, i as AnyGeneratorFunction, n as AnyAsyncGeneratorFunction, o as PlainObject, r as AnyFunction, s as TreeLike, t as AnyAsyncFunction } from "./index-D0_YLsqN.js";
5
4
  import { BigNumber, MathExpression, MathJsInstance, Matrix } from "mathjs";
6
5
 
7
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/basic.d.ts
6
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/basic.d.ts
8
7
  /**
9
8
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
10
9
 
@@ -15,8 +14,7 @@ type Class<T, Arguments extends unknown[] = any[]> = {
15
14
  new (...arguments_: Arguments): T;
16
15
  };
17
16
  //#endregion
18
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/internal/array.d.ts
19
-
17
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/internal/array.d.ts
20
18
  /**
21
19
  Transforms a tuple type by replacing it's rest element with a single element that has the same type as the rest element, while keeping all the non-rest elements intact.
22
20
 
@@ -50,8 +48,7 @@ type B = CollapseRestElement<[string?, string?, ...number[]]>;
50
48
  */
51
49
  type CollapseRestElement<TArray extends UnknownArray> = IfNotAnyOrNever<TArray, _CollapseRestElement<TArray>>;
52
50
  type _CollapseRestElement<TArray extends UnknownArray, ForwardAccumulator extends UnknownArray = [], BackwardAccumulator extends UnknownArray = []> = TArray extends UnknownArray // For distributing `TArray`
53
- ? keyof TArray & `${number}` extends never
54
- // Enters this branch, if `TArray` is empty (e.g., []),
51
+ ? keyof TArray & `${number}` extends never // Enters this branch, if `TArray` is empty (e.g., []),
55
52
  // or `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
56
53
  ? TArray extends readonly [...infer Rest, infer Last] ? _CollapseRestElement<Rest, ForwardAccumulator, [Last, ...BackwardAccumulator]> // Accumulate elements that are present after the rest element.
57
54
  : TArray extends readonly [] ? [...ForwardAccumulator, ...BackwardAccumulator] : [...ForwardAccumulator, TArray[number], ...BackwardAccumulator] // Add the rest element between the accumulated elements.
@@ -59,10 +56,9 @@ type _CollapseRestElement<TArray extends UnknownArray, ForwardAccumulator extend
59
56
  : First], BackwardAccumulator> : never // Should never happen, since `[(infer First)?, ...infer Rest]` is a top-type for arrays.
60
57
  : never; // Should never happen
61
58
  //#endregion
62
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/numeric.d.ts
59
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/numeric.d.ts
63
60
  type _Numeric = number | bigint;
64
61
  type Zero = 0 | 0n;
65
-
66
62
  /**
67
63
  Matches the hidden `Infinity` type.
68
64
 
@@ -74,7 +70,6 @@ Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/32277)
74
70
  */
75
71
  // See https://github.com/microsoft/TypeScript/issues/31752
76
72
  // eslint-disable-next-line no-loss-of-precision
77
-
78
73
  /**
79
74
  A negative `number`/`bigint` (`-∞ < x < 0`)
80
75
 
@@ -106,13 +101,12 @@ type IsNegative<T extends _Numeric> = T extends Negative<T> ? true : false;
106
101
  //#region node_modules/.pnpm/tagged-tag@1.0.0/node_modules/tagged-tag/index.d.ts
107
102
  declare const tag: unique symbol;
108
103
  //#endregion
109
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/tagged.d.ts
104
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/tagged.d.ts
110
105
  // eslint-disable-next-line type-fest/require-exported-types
111
106
  type TagContainer<Token> = {
112
107
  readonly [tag]: Token;
113
108
  };
114
109
  type Tag<Token extends PropertyKey, TagMetadata> = TagContainer<{ [K in Token]: TagMetadata }>;
115
-
116
110
  /**
117
111
  Attach a "tag" to an arbitrary type. This allows you to create distinct types, that aren't assignable to one another, for distinct concepts in your program that should not be interchangeable, even if their runtime values have the same type. (See examples.)
118
112
 
@@ -174,7 +168,7 @@ type SpecialCacheKey2 = Tagged<string, 'URL' | 'SpecialCacheKey'>;
174
168
 
175
169
  @category Type
176
170
  */
177
- type Tagged<Type$1, TagName extends PropertyKey, TagMetadata = never> = Type$1 & Tag<TagName, TagMetadata>;
171
+ type Tagged<Type, TagName extends PropertyKey, TagMetadata = never> = Type & Tag<TagName, TagMetadata>;
178
172
  /**
179
173
  Revert a tagged type back to its original type by removing all tags.
180
174
 
@@ -197,7 +191,7 @@ const moneyByAccountType: Record<UnwrapTagged<AccountType>, number> = {
197
191
  // Without UnwrapTagged, the following expression would throw a type error.
198
192
  const money = moneyByAccountType.SAVINGS; // TS error: Property 'SAVINGS' does not exist
199
193
 
200
- // Attempting to pass an non-Tagged type to UnwrapTagged will raise a type error.
194
+ // Attempting to pass a non-Tagged type to UnwrapTagged will raise a type error.
201
195
  // @ts-expect-error
202
196
  type WontWork = UnwrapTagged<string>;
203
197
  ```
@@ -206,7 +200,6 @@ type WontWork = UnwrapTagged<string>;
206
200
  */
207
201
  type UnwrapTagged<TaggedType extends Tag<PropertyKey, any>> = RemoveAllTags<TaggedType>;
208
202
  type RemoveAllTags<T> = T extends Tag<PropertyKey, any> ? { [ThisTag in keyof T[typeof tag]]: T extends Tagged<infer Type, ThisTag, T[typeof tag][ThisTag]> ? RemoveAllTags<Type> : never }[keyof T[typeof tag]] : T;
209
-
210
203
  /**
211
204
  Note: The `Opaque` type is deprecated in favor of `Tagged`.
212
205
 
@@ -282,7 +275,7 @@ type Person = {
282
275
  @deprecated Use {@link Tagged} instead
283
276
  */
284
277
  //#endregion
285
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/is-literal.d.ts
278
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-literal.d.ts
286
279
  /**
287
280
  Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
288
281
 
@@ -340,12 +333,11 @@ type L2 = Length<`${number}`>;
340
333
  @category Utilities
341
334
  */
342
335
  type IsStringLiteral<S> = IfNotAnyOrNever<S, _IsStringLiteral<CollapseLiterals<S extends TagContainer<any> ? UnwrapTagged<S> : S>>, false, false>;
343
- type _IsStringLiteral<S> =
344
- // If `T` is an infinite string type (e.g., `on${string}`), `Record<T, never>` produces an index signature,
336
+ type _IsStringLiteral<S> = // If `T` is an infinite string type (e.g., `on${string}`), `Record<T, never>` produces an index signature,
345
337
  // and since `{}` extends index signatures, the result becomes `false`.
346
338
  S extends string ? {} extends Record<S, never> ? false : true : false;
347
339
  //#endregion
348
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/tuple-of.d.ts
340
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/tuple-of.d.ts
349
341
  /**
350
342
  Create a tuple type of the specified length with elements of the specified type.
351
343
 
@@ -413,7 +405,160 @@ Note: If you need a readonly tuple, simply wrap this type with `Readonly`, for e
413
405
  type TupleOf<Length extends number, Fill = unknown> = IfNotAnyOrNever<Length, _TupleOf<If<IsNegative<Length>, 0, Length>, Fill, []>, Fill[], []>;
414
406
  type _TupleOf<L extends number, Fill, Accumulator extends UnknownArray> = number extends L ? Fill[] : L extends Accumulator['length'] ? Accumulator : _TupleOf<L, Fill, [...Accumulator, Fill]>;
415
407
  //#endregion
416
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/or.d.ts
408
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/some-extend.d.ts
409
+ /**
410
+ @see {@link SomeExtend}
411
+ */
412
+ type SomeExtendOptions = {
413
+ /**
414
+ Consider `never` elements to match the target type only if the target type itself is `never` (or `any`).
415
+ - When set to `true` (default), `never` is _not_ treated as a bottom type, instead, it is treated as a type that matches only itself (or `any`).
416
+ - When set to `false`, `never` is treated as a bottom type, and behaves as it normally would.
417
+ @default true
418
+ @example
419
+ ```
420
+ import type {SomeExtend} from 'type-fest';
421
+ type A = SomeExtend<[1, 2, never], string, {strictNever: true}>;
422
+ //=> false
423
+ type B = SomeExtend<[1, 2, never], string, {strictNever: false}>;
424
+ //=> true
425
+ type C = SomeExtend<[1, never], never, {strictNever: true}>;
426
+ //=> true
427
+ type D = SomeExtend<[1, never], never, {strictNever: false}>;
428
+ //=> true
429
+ type E = SomeExtend<[never], any, {strictNever: true}>;
430
+ //=> true
431
+ type F = SomeExtend<[never], any, {strictNever: false}>;
432
+ //=> true
433
+ ```
434
+ */
435
+ strictNever?: boolean;
436
+ };
437
+ type DefaultSomeExtendOptions = {
438
+ strictNever: true;
439
+ };
440
+ /**
441
+ Returns a boolean for whether some element in an array type extends another type.
442
+
443
+ @example
444
+ ```
445
+ import type {SomeExtend} from 'type-fest';
446
+
447
+ type A = SomeExtend<['1', '2', 3], number>;
448
+ //=> true
449
+
450
+ type B = SomeExtend<[1, 2, 3], string>;
451
+ //=> false
452
+
453
+ type C = SomeExtend<[string, number | string], number>;
454
+ //=> boolean
455
+
456
+ type D = SomeExtend<[true, boolean, true], false>;
457
+ //=> boolean
458
+ ```
459
+
460
+ Note: Behaviour of optional elements depend on the `exactOptionalPropertyTypes` compiler option. When the option is disabled, the target type must include `undefined` for a successful match.
461
+
462
+ ```
463
+ // @exactOptionalPropertyTypes: true
464
+ import type {SomeExtend} from 'type-fest';
465
+
466
+ type A = SomeExtend<[1?, 2?, '3'?], string>;
467
+ //=> true
468
+ ```
469
+
470
+ ```
471
+ // @exactOptionalPropertyTypes: false
472
+ import type {SomeExtend} from 'type-fest';
473
+
474
+ type A = SomeExtend<[1?, 2?, '3'?], string>;
475
+ //=> boolean
476
+
477
+ type B = SomeExtend<[1?, 2?, '3'?], string | undefined>;
478
+ //=> true
479
+ ```
480
+
481
+ @see {@link SomeExtendOptions}
482
+
483
+ @category Utilities
484
+ @category Array
485
+ */
486
+ type SomeExtend<TArray extends UnknownArray, Type, Options extends SomeExtendOptions = {}> = _SomeExtend<CollapseRestElement<TArray>, Type, ApplyDefaultOptions<SomeExtendOptions, DefaultSomeExtendOptions, Options>>;
487
+ type _SomeExtend<TArray extends UnknownArray, Type, Options extends Required<SomeExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, return `true`.
488
+ ? true : _SomeExtend<Rest, Type, Options> : First extends Type ? true : _SomeExtend<Rest, Type, Options> : false, false, false>;
489
+ //#endregion
490
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/or-all.d.ts
491
+ /**
492
+ Returns a boolean for whether any of the given elements is `true`.
493
+
494
+ Use-cases:
495
+ - Check if at least one condition in a list of booleans is met.
496
+
497
+ @example
498
+ ```
499
+ import type {OrAll} from 'type-fest';
500
+
501
+ type FFT = OrAll<[false, false, true]>;
502
+ //=> true
503
+
504
+ type FFF = OrAll<[false, false, false]>;
505
+ //=> false
506
+ ```
507
+
508
+ Note: When `boolean` is passed as an element, it is distributed into separate cases, and the final result is a union of those cases.
509
+ For example, `OrAll<[false, boolean]>` expands to `OrAll<[false, true]> | OrAll<[false, false]>`, which simplifies to `true | false` (i.e., `boolean`).
510
+
511
+ @example
512
+ ```
513
+ import type {OrAll} from 'type-fest';
514
+
515
+ type A = OrAll<[false, boolean]>;
516
+ //=> boolean
517
+
518
+ type B = OrAll<[true, boolean]>;
519
+ //=> true
520
+ ```
521
+
522
+ Note: If `never` is passed as an element, it is treated as `false` and the result is computed accordingly.
523
+
524
+ @example
525
+ ```
526
+ import type {OrAll} from 'type-fest';
527
+
528
+ type A = OrAll<[never, never, true]>;
529
+ //=> true
530
+
531
+ type B = OrAll<[never, never, false]>;
532
+ //=> false
533
+
534
+ type C = OrAll<[never, never, never]>;
535
+ //=> false
536
+
537
+ type D = OrAll<[never, never, boolean]>;
538
+ //=> boolean
539
+ ```
540
+
541
+ Note: If `any` is passed as an element, it is treated as `boolean` and the result is computed accordingly.
542
+
543
+ @example
544
+ ```
545
+ import type {OrAll} from 'type-fest';
546
+
547
+ type A = OrAll<[false, any]>;
548
+ //=> boolean
549
+
550
+ type B = OrAll<[true, any]>;
551
+ //=> true
552
+ ```
553
+
554
+ Note: `OrAll<[]>` evaluates to `false` because there are no `true` elements in an empty tuple. See [Wikipedia: Clause (logic) > Empty clauses](https://en.wikipedia.org/wiki/Clause_(logic)#Empty_clauses:~:text=The%20truth%20evaluation%20of%20an%20empty%20disjunctive%20clause%20is%20always%20false.).
555
+
556
+ @see {@link Or}
557
+ @see {@link AndAll}
558
+ */
559
+ type OrAll<T extends readonly boolean[]> = SomeExtend<T, true>;
560
+ //#endregion
561
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/or.d.ts
417
562
  /**
418
563
  Returns a boolean for whether either of two given types is true.
419
564
 
@@ -487,15 +632,13 @@ type G = Or<never, never>;
487
632
  //=> false
488
633
  ```
489
634
 
635
+ @see {@link OrAll}
490
636
  @see {@link And}
491
637
  @see {@link Xor}
492
638
  */
493
- type Or<A$1 extends boolean, B$1 extends boolean> = _Or<If<IsNever<A$1>, false, A$1>, If<IsNever<B$1>, false, B$1>>;
494
- // `never` is treated as `false`
495
-
496
- type _Or<A$1 extends boolean, B$1 extends boolean> = A$1 extends true ? true : B$1 extends true ? true : false;
639
+ type Or<A extends boolean, B extends boolean> = OrAll<[A, B]>;
497
640
  //#endregion
498
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/all-extend.d.ts
641
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/all-extend.d.ts
499
642
  /**
500
643
  @see {@link AllExtend}
501
644
  */
@@ -531,7 +674,6 @@ type AllExtendOptions = {
531
674
  type DefaultAllExtendOptions = {
532
675
  strictNever: true;
533
676
  };
534
-
535
677
  /**
536
678
  Returns a boolean for whether every element in an array type extends another type.
537
679
 
@@ -578,12 +720,85 @@ type B = AllExtend<[1?, 2?, 3?], number | undefined>;
578
720
  @category Utilities
579
721
  @category Array
580
722
  */
581
- type AllExtend<TArray extends UnknownArray, Type$1, Options extends AllExtendOptions = {}> = _AllExtend<CollapseRestElement<TArray>, Type$1, ApplyDefaultOptions<AllExtendOptions, DefaultAllExtendOptions, Options>>;
582
- type _AllExtend<TArray extends UnknownArray, Type$1, Options extends Required<AllExtendOptions>> = IfNotAnyOrNever<TArray, If<IsAny<Type$1>, true, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<IsNever<Type$1>, Not<Options['strictNever']>> extends true
583
- // If target `Type` is also `never` OR `strictNever` is disabled, recurse further.
584
- ? _AllExtend<Rest, Type$1, Options> : false : First extends Type$1 ? _AllExtend<Rest, Type$1, Options> : false : true>, false, false>;
723
+ type AllExtend<TArray extends UnknownArray, Type, Options extends AllExtendOptions = {}> = _AllExtend<CollapseRestElement<TArray>, Type, ApplyDefaultOptions<AllExtendOptions, DefaultAllExtendOptions, Options>>;
724
+ type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, recurse further.
725
+ ? _AllExtend<Rest, Type, Options> : false : First extends Type ? _AllExtend<Rest, Type, Options> : false : true, false, false>;
585
726
  //#endregion
586
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/and.d.ts
727
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/and-all.d.ts
728
+ /**
729
+ Returns a boolean for whether all of the given elements are `true`.
730
+
731
+ Use-cases:
732
+ - Check if all conditions in a list of booleans are met.
733
+
734
+ @example
735
+ ```
736
+ import type {AndAll} from 'type-fest';
737
+
738
+ type TTT = AndAll<[true, true, true]>;
739
+ //=> true
740
+
741
+ type TTF = AndAll<[true, true, false]>;
742
+ //=> false
743
+
744
+ type TFT = AndAll<[true, false, true]>;
745
+ //=> false
746
+ ```
747
+
748
+ Note: When `boolean` is passed as an element, it is distributed into separate cases, and the final result is a union of those cases.
749
+ For example, `AndAll<[true, boolean]>` expands to `AndAll<[true, true]> | AndAll<[true, false]>`, which simplifies to `true | false` (i.e., `boolean`).
750
+
751
+ @example
752
+ ```
753
+ import type {AndAll} from 'type-fest';
754
+
755
+ type A = AndAll<[true, boolean]>;
756
+ //=> boolean
757
+
758
+ type B = AndAll<[false, boolean]>;
759
+ //=> false
760
+ ```
761
+
762
+ Note: If any of the elements is `never`, the result becomes `false`.
763
+
764
+ @example
765
+ ```
766
+ import type {AndAll} from 'type-fest';
767
+
768
+ type A = AndAll<[true, true, never]>;
769
+ //=> false
770
+
771
+ type B = AndAll<[false, never, never]>;
772
+ //=> false
773
+
774
+ type C = AndAll<[never, never, never]>;
775
+ //=> false
776
+
777
+ type D = AndAll<[boolean, true, never]>;
778
+ //=> false
779
+ ```
780
+
781
+ Note: If `any` is passed as an element, it is treated as `boolean` and the result is computed accordingly.
782
+
783
+ @example
784
+ ```
785
+ import type {AndAll} from 'type-fest';
786
+
787
+ type A = AndAll<[false, any]>;
788
+ //=> false
789
+
790
+ type B = AndAll<[true, any]>;
791
+ //=> boolean
792
+ ```
793
+
794
+ Note: `AndAll<[]>` evaluates to `true` due to the concept of [vacuous truth](https://en.wikipedia.org/wiki/Logical_conjunction#:~:text=In%20keeping%20with%20the%20concept%20of%20vacuous%20truth%2C%20when%20conjunction%20is%20defined%20as%20an%20operator%20or%20function%20of%20arbitrary%20arity%2C%20the%20empty%20conjunction%20(AND%2Ding%20over%20an%20empty%20set%20of%20operands)%20is%20often%20defined%20as%20having%20the%20result%20true.), i.e., there are no `false` elements in an empty tuple.
795
+
796
+ @see {@link And}
797
+ @see {@link OrAll}
798
+ */
799
+ type AndAll<T extends readonly boolean[]> = AllExtend<T, true>;
800
+ //#endregion
801
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/and.d.ts
587
802
  /**
588
803
  Returns a boolean for whether two given types are both true.
589
804
 
@@ -657,23 +872,108 @@ type G = And<never, never>;
657
872
  //=> false
658
873
  ```
659
874
 
875
+ @see {@link AndAll}
660
876
  @see {@link Or}
661
877
  @see {@link Xor}
662
878
  */
663
- type And<A$1 extends boolean, B$1 extends boolean> = AllExtend<[A$1, B$1], true>;
879
+ type And<A extends boolean, B extends boolean> = AndAll<[A, B]>;
664
880
  //#endregion
665
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/union-to-tuple.d.ts
881
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/exclude-exactly.d.ts
666
882
  /**
667
- Returns the last element of a union type.
883
+ A stricter version of `Exclude<T, U>` that excludes types only when they are exactly identical.
668
884
 
669
885
  @example
670
886
  ```
671
- type Last = LastOfUnion<1 | 2 | 3>;
672
- //=> 3
887
+ import type {ExcludeExactly} from 'type-fest';
888
+
889
+ type TestExclude1 = Exclude<'a' | 'b' | 'c' | 1 | 2 | 3, string>;
890
+ //=> 1 | 2 | 3
891
+
892
+ type TestExcludeExactly1 = ExcludeExactly<'a' | 'b' | 'c' | 1 | 2 | 3, string>;
893
+ //=> 'a' | 'b' | 'c' | 1 | 2 | 3
894
+
895
+ type TestExclude2 = Exclude<'a' | 'b' | 'c' | 1 | 2 | 3, any>;
896
+ //=> never
897
+
898
+ type TestExcludeExactly2 = ExcludeExactly<'a' | 'b' | 'c' | 1 | 2 | 3, any>;
899
+ //=> 'a' | 'b' | 'c' | 1 | 2 | 3
900
+
901
+ type TestExclude3 = Exclude<{a: string} | {a: string; b: string}, {a: string}>;
902
+ //=> never
903
+
904
+ type TestExcludeExactly3 = ExcludeExactly<{a: string} | {a: string; b: string}, {a: string}>;
905
+ //=> {a: string; b: string}
673
906
  ```
907
+
908
+ @category Improved Built-in
674
909
  */
675
- type LastOfUnion<T> = UnionToIntersection<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
910
+ type ExcludeExactly<Union, Delete> = IfNotAnyOrNever<Union, _ExcludeExactly<Union, Delete>, // If `Union` is `any`, then if `Delete` is `any`, return `never`, else return `Union`.
911
+ If<IsAny<Delete>, never, Union>, // If `Union` is `never`, then if `Delete` is `never`, return `never`, else return `Union`.
912
+ If<IsNever<Delete>, never, Union>>;
913
+ type _ExcludeExactly<Union, Delete> = IfNotAnyOrNever<Delete, Union extends unknown // For distributing `Union`
914
+ ? [Delete extends unknown // For distributing `Delete`
915
+ ? If<IsEqual<Union, Delete>, true, never> : never] extends [never] ? Union : never : never, // If `Delete` is `any` or `never`, then return `Union`,
916
+ // because `Union` cannot be `any` or `never` here.
917
+ Union, Union>;
918
+ //#endregion
919
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/union-member.d.ts
920
+ /**
921
+ Returns an arbitrary member of a union type.
922
+
923
+ Use-cases:
924
+ - Implementing recursive type functions that accept a union type.
925
+
926
+ @example
927
+ ```
928
+ import type {UnionMember, IsNever} from 'type-fest';
929
+
930
+ type UnionLength<T, Acc extends any[] = []> =
931
+ UnionMember<T> extends infer Member
932
+ ? IsNever<Member> extends false
933
+ ? UnionLength<Exclude<T, Member>, [...Acc, Member]>
934
+ : Acc['length']
935
+ : never;
936
+
937
+ type T1 = UnionLength<'foo' | 'bar' | 'baz'>;
938
+ //=> 3
939
+
940
+ type T2 = UnionLength<{a: string}>;
941
+ //=> 1
942
+ ```
943
+
944
+ - Picking an arbitrary member from a union
945
+
946
+ @example
947
+ ```
948
+ import type {UnionMember, Primitive, LiteralToPrimitive} from 'type-fest';
949
+
950
+ type IsHomogenous<T extends Primitive> = [T] extends [LiteralToPrimitive<UnionMember<T>>] ? true : false;
676
951
 
952
+ type T1 = IsHomogenous<1 | 2 | 3 | 4>;
953
+ //=> true
954
+
955
+ type T2 = IsHomogenous<'foo' | 'bar'>;
956
+ //=> true
957
+
958
+ type T3 = IsHomogenous<'foo' | 'bar' | 1>;
959
+ //=> false
960
+ ```
961
+
962
+ Returns `never` when the input is `never`.
963
+
964
+ @example
965
+ ```
966
+ import type {UnionMember} from 'type-fest';
967
+
968
+ type LastNever = UnionMember<never>;
969
+ //=> never
970
+ ```
971
+
972
+ @category Type
973
+ */
974
+ type UnionMember<T> = IsNever<T> extends true ? never : UnionToIntersection<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
975
+ //#endregion
976
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/union-to-tuple.d.ts
677
977
  /**
678
978
  Convert a union type into an unordered tuple type of its elements.
679
979
 
@@ -709,9 +1009,9 @@ const petList = Object.keys(pets) as UnionToTuple<Pet>;
709
1009
 
710
1010
  @category Array
711
1011
  */
712
- type UnionToTuple<T, L = LastOfUnion<T>> = IsNever<T> extends false ? [...UnionToTuple<Exclude<T, L>>, L] : [];
1012
+ type UnionToTuple<T, L = UnionMember<T>> = IsNever<T> extends false ? [...UnionToTuple<ExcludeExactly<T, L>>, L] : [];
713
1013
  //#endregion
714
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/set-optional.d.ts
1014
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/set-optional.d.ts
715
1015
  /**
716
1016
  Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the `SetRequired` type.
717
1017
 
@@ -728,24 +1028,18 @@ type Foo = {
728
1028
  };
729
1029
 
730
1030
  type SomeOptional = SetOptional<Foo, 'b' | 'c'>;
731
- // type SomeOptional = {
732
- // a: number;
733
- // b?: string; // Was already optional and still is.
734
- // c?: boolean; // Is now optional.
735
- // }
1031
+ //=> {a: number; b?: string; c?: boolean}
736
1032
  ```
737
1033
 
738
1034
  @category Object
739
1035
  */
740
1036
  type SetOptional<BaseType, Keys extends keyof BaseType> = (BaseType extends ((...arguments_: never) => any) ? (...arguments_: Parameters<BaseType>) => ReturnType<BaseType> : unknown) & _SetOptional<BaseType, Keys>;
741
1037
  type _SetOptional<BaseType, Keys extends keyof BaseType> = BaseType extends unknown // To distribute `BaseType` when it's a union type.
742
- ? Simplify<
743
- // Pick just the keys that are readonly from the base type.
744
- Except<BaseType, Keys> &
745
- // Pick the keys that should be mutable from the base type and make them mutable.
1038
+ ? Simplify< // Pick just the keys that are readonly from the base type.
1039
+ Except<BaseType, Keys> & // Pick the keys that should be mutable from the base type and make them mutable.
746
1040
  Partial<HomomorphicPick<BaseType, Keys>>> : never;
747
1041
  //#endregion
748
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/split.d.ts
1042
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/split.d.ts
749
1043
  /**
750
1044
  Split options.
751
1045
 
@@ -773,7 +1067,6 @@ type SplitOptions = {
773
1067
  type DefaultSplitOptions = {
774
1068
  strictLiteralChecks: true;
775
1069
  };
776
-
777
1070
  /**
778
1071
  Represents an array of strings split using a given character or character set.
779
1072
 
@@ -799,19 +1092,17 @@ type Split<S extends string, Delimiter extends string, Options extends SplitOpti
799
1092
  type SplitHelper<S extends string, Delimiter extends string, Options extends Required<SplitOptions>, Accumulator extends string[] = []> = S extends string // For distributing `S`
800
1093
  ? Delimiter extends string // For distributing `Delimiter`
801
1094
  // If `strictLiteralChecks` is `false` OR `S` and `Delimiter` both are string literals, then perform the split
802
- ? Or<Not<Options['strictLiteralChecks']>, And<IsStringLiteral<S>, IsStringLiteral<Delimiter>>> extends true ? S extends `${infer Head}${Delimiter}${infer Tail}` ? SplitHelper<Tail, Delimiter, Options, [...Accumulator, Head]> : Delimiter extends '' ? S extends '' ? Accumulator : [...Accumulator, S] : [...Accumulator, S]
803
- // Otherwise, return `string[]`
1095
+ ? Or<Not<Options['strictLiteralChecks']>, And<IsStringLiteral<S>, IsStringLiteral<Delimiter>>> extends true ? S extends `${infer Head}${Delimiter}${infer Tail}` ? SplitHelper<Tail, Delimiter, Options, [...Accumulator, Head]> : Delimiter extends '' ? S extends '' ? Accumulator : [...Accumulator, S] : [...Accumulator, S] // Otherwise, return `string[]`
804
1096
  : string[] : never // Should never happen
805
1097
  : never; // Should never happen
806
1098
  //#endregion
807
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/replace.d.ts
1099
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/replace.d.ts
808
1100
  type ReplaceOptions = {
809
1101
  all?: boolean;
810
1102
  };
811
1103
  type DefaultReplaceOptions = {
812
1104
  all: false;
813
1105
  };
814
-
815
1106
  /**
816
1107
  Represents a string with some or all matches replaced by a replacement.
817
1108
 
@@ -916,7 +1207,7 @@ declare function arrayCompete<T>(initialList: readonly T[], match: (a: T, b: T,
916
1207
  * type list1 = number[]
917
1208
  * ```
918
1209
  */
919
- declare type List<A$1 = any> = ReadonlyArray<A$1>;
1210
+ declare type List<A = any> = ReadonlyArray<A>;
920
1211
  //#endregion
921
1212
  //#region node_modules/.pnpm/ts-toolbelt@9.6.0/node_modules/ts-toolbelt/out/Any/Cast.d.ts
922
1213
  /**
@@ -1184,7 +1475,7 @@ declare type IterationMap = {
1184
1475
  * type test1 = I.Pos<I.Prev<i>> // 19
1185
1476
  * ```
1186
1477
  */
1187
- declare type Prev<I$1 extends Iteration> = IterationMap[I$1[2]];
1478
+ declare type Prev<I extends Iteration> = IterationMap[I[2]];
1188
1479
  //#endregion
1189
1480
  //#region node_modules/.pnpm/ts-toolbelt@9.6.0/node_modules/ts-toolbelt/out/Iteration/IterationOf.d.ts
1190
1481
  /**
@@ -1222,7 +1513,7 @@ declare type IterationOf<N extends number> = `${N}` extends keyof IterationMap ?
1222
1513
  * type test1 = I.Pos<I.Next<i>> // 21
1223
1514
  * ```
1224
1515
  */
1225
- declare type Pos<I$1 extends Iteration> = I$1[0];
1516
+ declare type Pos<I extends Iteration> = I[0];
1226
1517
  //#endregion
1227
1518
  //#region node_modules/.pnpm/ts-toolbelt@9.6.0/node_modules/ts-toolbelt/out/List/Tail.d.ts
1228
1519
  /**
@@ -1264,7 +1555,7 @@ declare type Naked<L extends List> = Overwrite<Required<L>, L>;
1264
1555
  * ```ts
1265
1556
  * ```
1266
1557
  */
1267
- declare type Prepend<L extends List, A$1 extends any> = [A$1, ...L];
1558
+ declare type Prepend<L extends List, A extends any> = [A, ...L];
1268
1559
  //#endregion
1269
1560
  //#region node_modules/.pnpm/ts-toolbelt@9.6.0/node_modules/ts-toolbelt/out/Iteration/_Internal.d.ts
1270
1561
  /**
@@ -1288,7 +1579,7 @@ declare type Way = '->' | '<-';
1288
1579
  * type test3 = L.Append<[1, 2], [3, 4]> // [1, 2, [3, 4]]
1289
1580
  * ```
1290
1581
  */
1291
- declare type Append<L extends List, A$1 extends any> = [...L, A$1];
1582
+ declare type Append<L extends List, A extends any> = [...L, A];
1292
1583
  //#endregion
1293
1584
  //#region node_modules/.pnpm/ts-toolbelt@9.6.0/node_modules/ts-toolbelt/out/List/Drop.d.ts
1294
1585
  /**
@@ -1301,10 +1592,10 @@ declare type DropForth<L extends List, N extends Iteration> = {
1301
1592
  /**
1302
1593
  * @hidden
1303
1594
  */
1304
- declare type DropBack<L extends List, N extends Iteration, I$1 extends Iteration = Prev<N>, LN extends List = []> = {
1305
- 0: DropBack<L, N, Prev<I$1>, Prepend<LN, L[Pos<I$1>]>>;
1595
+ declare type DropBack<L extends List, N extends Iteration, I extends Iteration = Prev<N>, LN extends List = []> = {
1596
+ 0: DropBack<L, N, Prev<I>, Prepend<LN, L[Pos<I>]>>;
1306
1597
  1: LN;
1307
- }[Extends<-1, Pos<I$1>>];
1598
+ }[Extends<-1, Pos<I>>];
1308
1599
  /**
1309
1600
  * @hidden
1310
1601
  */
@@ -1333,10 +1624,10 @@ declare type Drop<L extends List, N extends number, way extends Way = '->'> = L
1333
1624
  * starts in reverse from `N` till `N` = 0
1334
1625
  * @hidden
1335
1626
  */
1336
- declare type TakeForth<L extends List, N extends Iteration, I$1 extends Iteration = Prev<N>, LN extends List = []> = {
1337
- 0: TakeForth<L, N, Prev<I$1>, Prepend<LN, L[Pos<I$1>]>>;
1627
+ declare type TakeForth<L extends List, N extends Iteration, I extends Iteration = Prev<N>, LN extends List = []> = {
1628
+ 0: TakeForth<L, N, Prev<I>, Prepend<LN, L[Pos<I>]>>;
1338
1629
  1: LN;
1339
- }[Extends<-1, Pos<I$1>>];
1630
+ }[Extends<-1, Pos<I>>];
1340
1631
  /**
1341
1632
  * starts in reverse from the end till `N` = 0
1342
1633
  * @hidden
@@ -1369,15 +1660,15 @@ declare type _Take<L extends List, N extends number, way extends Way = '->'> = _
1369
1660
  declare type Take<L extends List, N extends number, way extends Way = '->'> = L extends unknown ? N extends unknown ? _Take<L, N, way> : never : never;
1370
1661
  //#endregion
1371
1662
  //#region src/types/index.type.d.ts
1372
- type AnyArray<A$1 = any> = readonly A$1[];
1663
+ type AnyArray<A = any> = readonly A[];
1373
1664
  type Range<Start extends number, End extends number> = Exclude<keyof TupleOf<End>, keyof TupleOf<Start>>;
1374
- type TupleToEntries<A$1 extends readonly unknown[]> = If<IsAny<A$1>, unknown, { [Key in keyof A$1]: [Key, A$1[Key]] }>;
1665
+ type TupleToEntries<A extends readonly unknown[]> = If<IsAny<A>, unknown, { [Key in keyof A]: [Key, A[Key]] }>;
1375
1666
  type Groups<L extends AnyArray, LN extends AnyArray = [], D extends number[] = []> = D["length"] extends 40 ? LN : {
1376
1667
  0: Groups<Drop<L, 1>, Append<LN, [`${LN["length"]}`, Take<L, 1>]>, [...D, 0]>;
1377
1668
  1: LN;
1378
1669
  }[Extends<L, AnyArray<never>>];
1379
1670
  type TupleToGroups<L extends AnyArray> = Groups<L> extends infer X ? Cast<X, AnyArray> : never;
1380
- type MatchFunction<T, R$1 = unknown> = (row: T, index: number) => R$1;
1671
+ type MatchFunction<T, R = unknown> = (row: T, index: number) => R;
1381
1672
  //#endregion
1382
1673
  //#region src/utils/array/arrayCounting.d.ts
1383
1674
  /**
@@ -1396,7 +1687,7 @@ type MatchFunction<T, R$1 = unknown> = (row: T, index: number) => R$1;
1396
1687
  * arrayCounting(users, (u) => u.group); // { A: 2, B: 1 }
1397
1688
  * ```
1398
1689
  */
1399
- declare function arrayCounting<T, K$1 extends PropertyKey>(initialList: readonly T[], match: MatchFunction<T, K$1>): Record<string, number>;
1690
+ declare function arrayCounting<T, K extends PropertyKey>(initialList: readonly T[], match: MatchFunction<T, K>): Record<string, number>;
1400
1691
  //#endregion
1401
1692
  //#region src/utils/array/arrayDifference.d.ts
1402
1693
  /**
@@ -1523,7 +1814,7 @@ declare function arrayMerge<T, D = T>(initialList: readonly T[], mergeList: read
1523
1814
  * ```
1524
1815
  */
1525
1816
  declare function arrayPick<const T>(initialList: readonly T[], filter: (row: T, index: number) => boolean): T[];
1526
- declare function arrayPick<const T, K$1 = T>(initialList: readonly T[], filter: (row: T, index: number) => boolean, mapper: ((row: T, index: number) => K$1)): K$1[];
1817
+ declare function arrayPick<const T, K = T>(initialList: readonly T[], filter: (row: T, index: number) => boolean, mapper: ((row: T, index: number) => K)): K[];
1527
1818
  //#endregion
1528
1819
  //#region src/utils/array/arrayReplace.d.ts
1529
1820
  /**
@@ -1541,8 +1832,8 @@ declare function arrayPick<const T, K$1 = T>(initialList: readonly T[], filter:
1541
1832
  * ```
1542
1833
  */
1543
1834
  declare function arrayReplace<const T>(initialList: readonly T[], newItem: T, match: MatchFunction<T, boolean>): T[];
1544
- declare function arrayReplace<const T, K$1 extends T>(initialList: readonly T[], newItem: K$1, match: MatchFunction<T, boolean>): T[];
1545
- declare function arrayReplace<const T, K$1>(initialList: readonly T[], newItem: K$1, match: MatchFunction<T, boolean>): (T | K$1)[];
1835
+ declare function arrayReplace<const T, K extends T>(initialList: readonly T[], newItem: K, match: MatchFunction<T, boolean>): T[];
1836
+ declare function arrayReplace<const T, K>(initialList: readonly T[], newItem: K, match: MatchFunction<T, boolean>): (T | K)[];
1546
1837
  //#endregion
1547
1838
  //#region src/utils/array/arrayReplaceMove.d.ts
1548
1839
  type PositionType = "start" | "end" | number;
@@ -1627,9 +1918,9 @@ declare function arrayZip(): [];
1627
1918
  * arrayZipToObject(["a", "b"], 1); // { a: 1, b: 1 }
1628
1919
  * ```
1629
1920
  */
1630
- declare function arrayZipToObject<const K$1 extends PropertyKey, const V$1>(keys: readonly K$1[], array: readonly V$1[]): Record<K$1, V$1>;
1631
- declare function arrayZipToObject<const K$1 extends PropertyKey, const V$1>(keys: readonly K$1[], match: MatchFunction<K$1, V$1>): Record<K$1, V$1>;
1632
- declare function arrayZipToObject<const K$1 extends PropertyKey, const V$1>(keys: readonly K$1[], value: V$1): Record<K$1, V$1>;
1921
+ declare function arrayZipToObject<const K extends PropertyKey, const V>(keys: readonly K[], array: readonly V[]): Record<K, V>;
1922
+ declare function arrayZipToObject<const K extends PropertyKey, const V>(keys: readonly K[], match: MatchFunction<K, V>): Record<K, V>;
1923
+ declare function arrayZipToObject<const K extends PropertyKey, const V>(keys: readonly K[], value: V): Record<K, V>;
1633
1924
  //#endregion
1634
1925
  //#region src/utils/device/isBrowser.d.ts
1635
1926
  declare function isBrowser(): boolean;
@@ -1693,7 +1984,7 @@ declare function isTablet(minWidth?: number, maxWidth?: number, dpi?: number): b
1693
1984
  * console.log(data);
1694
1985
  * ```
1695
1986
  */
1696
- declare function to<T, U$1 = Error>(promise: Readonly<Promise<T>>, errorExt?: PlainObject): Promise<[U$1, undefined] | [null, T]>;
1987
+ declare function to<T, U = Error>(promise: Readonly<Promise<T>>, errorExt?: PlainObject): Promise<[U, undefined] | [null, T]>;
1697
1988
  //#endregion
1698
1989
  //#region src/utils/math/mathToBignumber.d.ts
1699
1990
  /**
@@ -1974,7 +2265,7 @@ interface BigInt64Array$1 {
1974
2265
  * the accumulation. The first call to the callbackfn function provides this value as an argument
1975
2266
  * instead of an array value.
1976
2267
  */
1977
- reduce<U$1>(callbackfn: (previousValue: U$1, currentValue: bigint, currentIndex: number, array: BigInt64Array$1) => U$1, initialValue: U$1): U$1;
2268
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array$1) => U, initialValue: U): U;
1978
2269
  /**
1979
2270
  * Calls the specified callback function for all the elements in an array, in descending order.
1980
2271
  * The return value of the callback function is the accumulated result, and is provided as an
@@ -1996,7 +2287,7 @@ interface BigInt64Array$1 {
1996
2287
  * the accumulation. The first call to the callbackfn function provides this value as an argument
1997
2288
  * instead of an array value.
1998
2289
  */
1999
- reduceRight<U$1>(callbackfn: (previousValue: U$1, currentValue: bigint, currentIndex: number, array: BigInt64Array$1) => U$1, initialValue: U$1): U$1;
2290
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array$1) => U, initialValue: U): U;
2000
2291
  /** Reverses the elements in the array. */
2001
2292
  reverse(): this;
2002
2293
  /**
@@ -2183,7 +2474,7 @@ interface BigUint64Array$1 {
2183
2474
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2184
2475
  * instead of an array value.
2185
2476
  */
2186
- reduce<U$1>(callbackfn: (previousValue: U$1, currentValue: bigint, currentIndex: number, array: BigUint64Array$1) => U$1, initialValue: U$1): U$1;
2477
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array$1) => U, initialValue: U): U;
2187
2478
  /**
2188
2479
  * Calls the specified callback function for all the elements in an array, in descending order.
2189
2480
  * The return value of the callback function is the accumulated result, and is provided as an
@@ -2205,7 +2496,7 @@ interface BigUint64Array$1 {
2205
2496
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2206
2497
  * instead of an array value.
2207
2498
  */
2208
- reduceRight<U$1>(callbackfn: (previousValue: U$1, currentValue: bigint, currentIndex: number, array: BigUint64Array$1) => U$1, initialValue: U$1): U$1;
2499
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array$1) => U, initialValue: U): U;
2209
2500
  /** Reverses the elements in the array. */
2210
2501
  reverse(): this;
2211
2502
  /**
@@ -2340,7 +2631,6 @@ declare class Any {
2340
2631
  /**
2341
2632
  * Represents a class constructor.
2342
2633
  */
2343
-
2344
2634
  /**
2345
2635
  * Get all properties **not using** the `?:` type operator.
2346
2636
  */
@@ -2354,7 +2644,7 @@ type OptionalKeys<T> = T extends any ? keyof T extends infer K ? K extends keyof
2354
2644
  *
2355
2645
  * Otherwise false.
2356
2646
  */
2357
- type IsExactType<Left, Right> = [Left] extends [Any] ? [Right] extends [Any] ? true : false : (<U$1>() => U$1 extends Left ? 1 : 0) extends (<U$1>() => U$1 extends Right ? 1 : 0) ? true : false;
2647
+ type IsExactType<Left, Right> = [Left] extends [Any] ? [Right] extends [Any] ? true : false : (<U>() => U extends Left ? 1 : 0) extends (<U>() => U extends Right ? 1 : 0) ? true : false;
2358
2648
  type Primitive = number | string | boolean | symbol | bigint | null | undefined | void;
2359
2649
  /**
2360
2650
  * Coerce a primitive type to its boxed equivalent.
@@ -2407,7 +2697,6 @@ declare namespace WebDocumentAPI {
2407
2697
  type BuiltInType = GlobalObjectType<'Node'> | GlobalObjectType<'NodeList'> | GlobalObjectType<'NodeIterator'> | GlobalObjectType<'HTMLCollection'> | GlobalObjectType<'CSSStyleDeclaration'> | GlobalObjectType<'DOMStringList'> | GlobalObjectType<'DOMTokenList'>;
2408
2698
  }
2409
2699
  type GlobalObjectType<Identifier extends string> = [Identifier] extends [Any] ? never : keyof Identifier extends never ? never : typeof globalThis extends { [P in Identifier]: any } ? InstanceType<(typeof globalThis)[Identifier]> : never;
2410
-
2411
2700
  /**
2412
2701
  * Converts a `PromiseLike` to a `Promise<Result>`.
2413
2702
  *
@@ -2430,7 +2719,6 @@ type GlobalObjectType<Identifier extends string> = [Identifier] extends [Any] ?
2430
2719
  * ```
2431
2720
  * @version 12.4.0
2432
2721
  */
2433
-
2434
2722
  /**
2435
2723
  * The return type for `assign`.
2436
2724
  *
@@ -2460,11 +2748,13 @@ type AssignDeep<TInitial, TOverride, IsOptional = false> = never
2460
2748
  /**
2461
2749
  * When a native type is found in TInitial, it will only exist in
2462
2750
  * the result type if the override is optional.
2463
- */ | (TInitial extends AtomicValue ? IsOptional extends true ? TInitial : never : never)
2751
+ */
2752
+ | (TInitial extends AtomicValue ? IsOptional extends true ? TInitial : never : never)
2464
2753
  /**
2465
2754
  * When a native type is found in TOverride, it will always exists
2466
2755
  * in the result type.
2467
- */ | (TOverride extends AtomicValue ? TOverride : never)
2756
+ */
2757
+ | (TOverride extends AtomicValue ? TOverride : never)
2468
2758
  /**
2469
2759
  * Deep assignment is handled in this branch.
2470
2760
  *
@@ -2475,10 +2765,9 @@ type AssignDeep<TInitial, TOverride, IsOptional = false> = never
2475
2765
  * every non-native object in TInitial
2476
2766
  * 4. For each non-object type in TOverride, simply replace TInitial
2477
2767
  * (or use "A | B" if the override is optional)
2478
- */ | (Exclude<TOverride, AtomicValue> extends infer TOverride ? Exclude<TInitial, Exclude<AtomicValue, void>> extends infer TInitial ? [Extract<TInitial, object>] extends [never] ? TOverride | (IsOptional extends true ? TInitial : never) : TInitial extends object ? TOverride extends object ? IsExactType<TOverride, TInitial> extends true ? TOverride : Assign<TInitial, TOverride> :
2479
- // 4.
2768
+ */
2769
+ | (Exclude<TOverride, AtomicValue> extends infer TOverride ? Exclude<TInitial, Exclude<AtomicValue, void>> extends infer TInitial ? [Extract<TInitial, object>] extends [never] ? TOverride | (IsOptional extends true ? TInitial : never) : TInitial extends object ? TOverride extends object ? IsExactType<TOverride, TInitial> extends true ? TOverride : Assign<TInitial, TOverride> : // 4.
2480
2770
  TOverride | (IsOptional extends true ? TInitial : never) : Extract<TOverride, object> | (IsOptional extends true ? TInitial : never) : never : never);
2481
-
2482
2771
  /**
2483
2772
  * Creates a shallow copy of the given object/value.
2484
2773
  *
@@ -2512,8 +2801,8 @@ TOverride | (IsOptional extends true ? TInitial : never) : Extract<TOverride, ob
2512
2801
  * objectAssign(initial, override); // { a: 1, b: { c: 2, d: 3 } }
2513
2802
  * ```
2514
2803
  */
2515
- declare function objectAssign<I$1 extends PlainObject, O extends PlainObject>(initial: I$1, override: O): Assign<I$1, O>;
2516
- declare function objectAssign<I$1 extends AnyObject, O extends AnyObject>(initial: I$1, override: O): Assign<I$1, O>;
2804
+ declare function objectAssign<I extends PlainObject, O extends PlainObject>(initial: I, override: O): Assign<I, O>;
2805
+ declare function objectAssign<I extends AnyObject, O extends AnyObject>(initial: I, override: O): Assign<I, O>;
2517
2806
  //#endregion
2518
2807
  //#region src/utils/object/objectCrush.d.ts
2519
2808
  type Crush<T> = T extends readonly (infer U)[] ? Record<string, U extends object ? unknown : U> : Simplify<UnionToIntersection<keyof T extends infer Prop ? Prop extends keyof T ? T[Prop] extends infer Value ? ([Extract<Value, object>] extends [never] ? never : Record<string, unknown>) | ([Exclude<Value, object>] extends [never] ? never : [Extract<Value, object>] extends [never] ? { [P in Prop]: Value } : Record<string, unknown>) : never : never : never>>;
@@ -2544,13 +2833,13 @@ declare function objectCrush<T extends AnyObject>(anyObject: T): Crush<T>;
2544
2833
  * ```
2545
2834
  */
2546
2835
  declare function objectEntries<const S extends string>(string: S): TupleToEntries<Split<S, "">>;
2547
- declare function objectEntries<const A$1 extends readonly unknown[]>(array: A$1): TupleToGroups<A$1>;
2836
+ declare function objectEntries<const A extends readonly unknown[]>(array: A): TupleToGroups<A>;
2548
2837
  declare function objectEntries<const O extends PlainObject>(plainObject: O): [`${keyof Except<O, symbol>}`, O[keyof Except<O, symbol>]][];
2549
2838
  declare function objectEntries<const O extends AnyObject>(anyObject: O): [`${keyof Except<O, symbol>}`, O[keyof Except<O, symbol>]][];
2550
2839
  //#endregion
2551
2840
  //#region src/utils/object/objectInvert.d.ts
2552
- type IntersectOf<U$1> = (U$1 extends unknown ? (k: U$1) => void : never) extends ((k: infer I) => void) ? I : never;
2553
- type ComputeRaw<A$1> = A$1 extends AnyFunction ? A$1 : { [K in keyof A$1]: A$1[K] } & unknown;
2841
+ type IntersectOf<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
2842
+ type ComputeRaw<A> = A extends AnyFunction ? A : { [K in keyof A]: A[K] } & unknown;
2554
2843
  type _Invert<O extends Record<PropertyKey, PropertyKey>> = ComputeRaw<IntersectOf<{ [K in keyof O]: Record<O[K], K> }[keyof O]>>;
2555
2844
  type Invert<O extends Record<keyof O, PropertyKey>> = O extends unknown ? _Invert<O> : never;
2556
2845
  /**
@@ -2580,7 +2869,7 @@ declare function objectInvert<const O extends AnyObject>(anyObject: O): Invert<O
2580
2869
  * ```
2581
2870
  */
2582
2871
  declare function objectKeys<const S extends string>(string: S): UnionToTuple<Range<0, Split<S, "">["length"]>>;
2583
- declare function objectKeys<const A$1 extends ArrayLike<unknown>>(array: A$1): UnionToTuple<Range<0, A$1["length"]>>;
2872
+ declare function objectKeys<const A extends ArrayLike<unknown>>(array: A): UnionToTuple<Range<0, A["length"]>>;
2584
2873
  declare function objectKeys<O extends PlainObject>(plainObject: O): `${Extract<keyof O, string | number>}`[];
2585
2874
  declare function objectKeys<O extends AnyObject>(anyObject: O): `${Extract<keyof O, string | number>}`[];
2586
2875
  //#endregion
@@ -2596,8 +2885,8 @@ declare function objectKeys<O extends AnyObject>(anyObject: O): `${Extract<keyof
2596
2885
  * objectOmit({ a: 1, b: 2 }, ["a"]); // { b: 2 }
2597
2886
  * ```
2598
2887
  */
2599
- declare function objectOmit<O extends PlainObject, K$1 extends keyof O>(plainObject: O, keys: readonly K$1[]): Omit<O, K$1>;
2600
- declare function objectOmit<O extends AnyObject, K$1 extends keyof O>(anyObject: O, keys: readonly K$1[]): Omit<O, K$1>;
2888
+ declare function objectOmit<O extends PlainObject, K extends keyof O>(plainObject: O, keys: readonly K[]): Omit<O, K>;
2889
+ declare function objectOmit<O extends AnyObject, K extends keyof O>(anyObject: O, keys: readonly K[]): Omit<O, K>;
2601
2890
  //#endregion
2602
2891
  //#region src/utils/object/objectPick.d.ts
2603
2892
  /**
@@ -2611,8 +2900,8 @@ declare function objectOmit<O extends AnyObject, K$1 extends keyof O>(anyObject:
2611
2900
  * objectPick({ a: 1, b: 2 }, ["a"]); // { a: 1 }
2612
2901
  * ```
2613
2902
  */
2614
- declare function objectPick<O extends PlainObject, K$1 extends keyof O>(plainObject: O, keys: readonly K$1[]): Pick<O, K$1>;
2615
- declare function objectPick<O extends AnyObject, K$1 extends keyof O>(anyObject: O, keys: readonly K$1[]): Pick<O, K$1>;
2903
+ declare function objectPick<O extends PlainObject, K extends keyof O>(plainObject: O, keys: readonly K[]): Pick<O, K>;
2904
+ declare function objectPick<O extends AnyObject, K extends keyof O>(anyObject: O, keys: readonly K[]): Pick<O, K>;
2616
2905
  //#endregion
2617
2906
  //#region src/utils/object/objectValues.d.ts
2618
2907
  /**
@@ -2626,7 +2915,7 @@ declare function objectPick<O extends AnyObject, K$1 extends keyof O>(anyObject:
2626
2915
  * ```
2627
2916
  */
2628
2917
  declare function objectValues<S extends string>(string: S): Split<S, "">;
2629
- declare function objectValues<A$1 extends ArrayLike<unknown>>(array: A$1): A$1;
2918
+ declare function objectValues<A extends ArrayLike<unknown>>(array: A): A;
2630
2919
  declare function objectValues<O extends PlainObject>(plainObject: O): O[keyof O][];
2631
2920
  declare function objectValues<O extends AnyObject>(anyObject: O): O[keyof O][];
2632
2921
  //#endregion
@@ -2663,7 +2952,7 @@ declare function stringInitialCase(input: string, caseType?: "lower" | "upper" |
2663
2952
  * stringReplace("hello world", "world", "context"); // "hello context"
2664
2953
  * ```
2665
2954
  */
2666
- declare function stringReplace<I$1 extends string, S extends string, R$1 extends string>(input: I$1, search: S, replacement: R$1): Replace<I$1, S, R$1>;
2955
+ declare function stringReplace<I extends string, S extends string, R extends string>(input: I, search: S, replacement: R): Replace<I, S, R>;
2667
2956
  //#endregion
2668
2957
  //#region src/utils/string/stringTemplate.d.ts
2669
2958
  /**
@@ -2917,7 +3206,7 @@ declare function treeForEach<T extends AnyObject, CK extends string = ChildrenKe
2917
3206
  //#endregion
2918
3207
  //#region src/utils/tree/treeMap.d.ts
2919
3208
  type TreeMapOptions<T extends AnyObject, CK extends string> = BaseOptions<T, CK>;
2920
- type TreeMapCallback<R$1 extends AnyObject, T extends AnyObject> = (row: T, meta: BaseCallbackMeta<T>) => R$1;
3209
+ type TreeMapCallback<R extends AnyObject, T extends AnyObject> = (row: T, meta: BaseCallbackMeta<T>) => R;
2921
3210
  /**
2922
3211
  * 映射树节点
2923
3212
  * - 返回新的树结构,保持层级关系
@@ -2933,8 +3222,8 @@ type TreeMapCallback<R$1 extends AnyObject, T extends AnyObject> = (row: T, meta
2933
3222
  * // [{ id: 1, val: 20, children: [{ id: 2, val: 40 }] }]
2934
3223
  * ```
2935
3224
  */
2936
- declare function treeMap<R$1 extends AnyObject, T extends AnyObject, CK extends string = ChildrenKey>(tree: T[], callback: TreeMapCallback<R$1, T>, options?: TreeMapOptions<T, CK>): TreeLike<R$1, CK>[];
2937
- declare function treeMap<R$1 extends AnyObject, T extends AnyObject, CK extends string = ChildrenKey>(tree: T, callback: TreeMapCallback<R$1, T>, options?: TreeMapOptions<T, CK>): TreeLike<R$1, CK>;
3225
+ declare function treeMap<R extends AnyObject, T extends AnyObject, CK extends string = ChildrenKey>(tree: T[], callback: TreeMapCallback<R, T>, options?: TreeMapOptions<T, CK>): TreeLike<R, CK>[];
3226
+ declare function treeMap<R extends AnyObject, T extends AnyObject, CK extends string = ChildrenKey>(tree: T, callback: TreeMapCallback<R, T>, options?: TreeMapOptions<T, CK>): TreeLike<R, CK>;
2938
3227
  //#endregion
2939
3228
  //#region src/utils/tree/rowsToTree.d.ts
2940
3229
  interface RowsToTreeOptions<RK extends string = RowKey, PK extends string = ParentIdKey, CK extends string = ChildrenKey> {
@@ -2959,7 +3248,7 @@ interface RowsToTreeOptions<RK extends string = RowKey, PK extends string = Pare
2959
3248
  * // [{ id: 1, parentId: null, children: [{ id: 2, parentId: 1 }] }]
2960
3249
  * ```
2961
3250
  */
2962
- declare function rowsToTree<T extends AnyObject = AnyObject, CK extends string = ChildrenKey, R$1 = TreeLike<T, CK>, RK extends string = RowKey, PK extends string = ParentIdKey>(rows: T[], options?: RowsToTreeOptions<RK, PK, CK> | undefined): R$1[];
3251
+ declare function rowsToTree<T extends AnyObject = AnyObject, CK extends string = ChildrenKey, R = TreeLike<T, CK>, RK extends string = RowKey, PK extends string = ParentIdKey>(rows: T[], options?: RowsToTreeOptions<RK, PK, CK> | undefined): R[];
2963
3252
  //#endregion
2964
3253
  //#region src/utils/tree/treeToRows.d.ts
2965
3254
  type TreeToRowsOptions<T extends AnyObject, CK extends string = ChildrenKey> = TreeForeachOptions<T, CK>;
@@ -2977,7 +3266,7 @@ type TreeToRowsOptions<T extends AnyObject, CK extends string = ChildrenKey> = T
2977
3266
  * // [{ id: 1, children: undefined }, { id: 2, children: undefined }]
2978
3267
  * ```
2979
3268
  */
2980
- declare function treeToRows<T extends AnyObject, CK extends string = ChildrenKey, R$1 extends AnyObject = SetOptional<T, CK>>(tree: T | T[], options?: TreeToRowsOptions<T, CK>): R$1[];
3269
+ declare function treeToRows<T extends AnyObject, CK extends string = ChildrenKey, R extends AnyObject = SetOptional<T, CK>>(tree: T | T[], options?: TreeToRowsOptions<T, CK>): R[];
2981
3270
  //#endregion
2982
3271
  //#region src/utils/typeof/isAbortSignal.d.ts
2983
3272
  /**
@@ -3258,8 +3547,8 @@ declare function isInfinityLike(value: unknown): boolean;
3258
3547
  * ```ts
3259
3548
  * isObject({}); // true
3260
3549
  * isObject([]); // false
3261
- * isObject(new Date()); // false (because prototype is not Object.prototype)
3262
- * isObject(new Date(), false); // true (is object type)
3550
+ * isObject(new Date()); // false
3551
+ * isObject(new Date(), false); // true
3263
3552
  * isObject(Object.create(null)) // false
3264
3553
  * isObject(Object.create(null), false) // true
3265
3554
  * ```
@@ -3371,5 +3660,5 @@ declare function isWebSocket(value: unknown): value is WebSocket;
3371
3660
  */
3372
3661
  declare function isWindow(value: unknown): value is Window;
3373
3662
  //#endregion
3374
- export { arrayCast, arrayCompete, arrayCounting, arrayDifference, arrayFirst, arrayFork, arrayIntersection, arrayLast, arrayMerge, arrayPick, arrayReplace, arrayReplaceMove, arraySplit, arrayUnzip, arrayZip, arrayZipToObject, clone, cloneDeep, cloneDeepWith, enumEntries, enumKeys, enumValues, getTimeZone, isAbortSignal, isArray, isAsyncFunction, isAsyncGeneratorFunction, isBigInt, isBlob, isBoolean, isBrowser, isClass, isDate, isEnumeration, isEqual, isError, isFalsy, isFalsyLike, isFile, isFunction, isGeneratorFunction, isIOSMobile, isIframe, isInIframe, isInfinity, isInfinityLike, isInteger, isIterable, isMap, isMobile, isNaN, isNegativeInteger, isNull, isNumber, isObject, isPositiveInteger, isPromise, isPromiseLike, isReadableStream, isRegExp, isSet, isString, isSymbol, isTablet, isTypedArray, isURLSearchParams, isUndefined, isWeakMap, isWeakSet, isWebSocket, isWebWorker, isWindow, mathToBignumber, mathToDecimal, mathToEvaluate, numberWithin, objectAssign, objectCrush, objectEntries, objectInvert, objectKeys, objectMapEntries, objectOmit, objectPick, objectValues, rowsToTree, stringInitialCase, stringReplace, stringTemplate, stringToJson, stringToLowerCase, stringToNumber, stringToPosix, stringToUpperCase, stringToValues, stringTrim, stringTruncate, to, treeFilter, treeFind, treeForEach, treeMap, treeToRows };
3663
+ export { arrayCast, arrayCompete, arrayCounting, arrayDifference, arrayFirst, arrayFork, arrayIntersection, arrayLast, arrayMerge, arrayPick, arrayReplace, arrayReplaceMove, arraySplit, arrayUnzip, arrayZip, arrayZipToObject, enumEntries, enumKeys, enumValues, getTimeZone, isAbortSignal, isArray, isAsyncFunction, isAsyncGeneratorFunction, isBigInt, isBlob, isBoolean, isBrowser, isClass, isDate, isEnumeration, isEqual, isError, isFalsy, isFalsyLike, isFile, isFunction, isGeneratorFunction, isIOSMobile, isIframe, isInIframe, isInfinity, isInfinityLike, isInteger, isIterable, isMap, isMobile, isNaN, isNegativeInteger, isNull, isNumber, isObject, isPositiveInteger, isPromise, isPromiseLike, isReadableStream, isRegExp, isSet, isString, isSymbol, isTablet, isTypedArray, isURLSearchParams, isUndefined, isWeakMap, isWeakSet, isWebSocket, isWebWorker, isWindow, mathToBignumber, mathToDecimal, mathToEvaluate, numberWithin, objectAssign, objectCrush, objectEntries, objectInvert, objectKeys, objectMapEntries, objectOmit, objectPick, objectValues, rowsToTree, stringInitialCase, stringReplace, stringTemplate, stringToJson, stringToLowerCase, stringToNumber, stringToPosix, stringToUpperCase, stringToValues, stringTrim, stringTruncate, to, treeFilter, treeFind, treeForEach, treeMap, treeToRows };
3375
3664
  //# sourceMappingURL=index.d.ts.map