@pawover/kit 0.0.0-beta.40 → 0.0.0-beta.42

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/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
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";
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-C_xUtgFe.js";
2
+ import { t as ValueOf } from "./value-of-DPr10cdW.js";
3
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
4
  import { clone, cloneDeep, cloneDeepWith } from "lodash-es";
5
5
  import { BigNumber, MathExpression, MathJsInstance, Matrix } from "mathjs";
6
6
 
7
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/basic.d.ts
7
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/basic.d.ts
8
8
  /**
9
9
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
10
10
 
@@ -15,7 +15,7 @@ type Class<T, Arguments extends unknown[] = any[]> = {
15
15
  new (...arguments_: Arguments): T;
16
16
  };
17
17
  //#endregion
18
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/internal/array.d.ts
18
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/internal/array.d.ts
19
19
 
20
20
  /**
21
21
  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.
@@ -59,7 +59,7 @@ type _CollapseRestElement<TArray extends UnknownArray, ForwardAccumulator extend
59
59
  : First], BackwardAccumulator> : never // Should never happen, since `[(infer First)?, ...infer Rest]` is a top-type for arrays.
60
60
  : never; // Should never happen
61
61
  //#endregion
62
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/numeric.d.ts
62
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/numeric.d.ts
63
63
  type _Numeric = number | bigint;
64
64
  type Zero = 0 | 0n;
65
65
 
@@ -106,7 +106,7 @@ type IsNegative<T extends _Numeric> = T extends Negative<T> ? true : false;
106
106
  //#region node_modules/.pnpm/tagged-tag@1.0.0/node_modules/tagged-tag/index.d.ts
107
107
  declare const tag: unique symbol;
108
108
  //#endregion
109
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/tagged.d.ts
109
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/tagged.d.ts
110
110
  // eslint-disable-next-line type-fest/require-exported-types
111
111
  type TagContainer<Token> = {
112
112
  readonly [tag]: Token;
@@ -197,7 +197,7 @@ const moneyByAccountType: Record<UnwrapTagged<AccountType>, number> = {
197
197
  // Without UnwrapTagged, the following expression would throw a type error.
198
198
  const money = moneyByAccountType.SAVINGS; // TS error: Property 'SAVINGS' does not exist
199
199
 
200
- // Attempting to pass an non-Tagged type to UnwrapTagged will raise a type error.
200
+ // Attempting to pass a non-Tagged type to UnwrapTagged will raise a type error.
201
201
  // @ts-expect-error
202
202
  type WontWork = UnwrapTagged<string>;
203
203
  ```
@@ -282,7 +282,7 @@ type Person = {
282
282
  @deprecated Use {@link Tagged} instead
283
283
  */
284
284
  //#endregion
285
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/is-literal.d.ts
285
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-literal.d.ts
286
286
  /**
287
287
  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
288
 
@@ -345,7 +345,7 @@ type _IsStringLiteral<S> =
345
345
  // and since `{}` extends index signatures, the result becomes `false`.
346
346
  S extends string ? {} extends Record<S, never> ? false : true : false;
347
347
  //#endregion
348
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/tuple-of.d.ts
348
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/tuple-of.d.ts
349
349
  /**
350
350
  Create a tuple type of the specified length with elements of the specified type.
351
351
 
@@ -413,7 +413,162 @@ Note: If you need a readonly tuple, simply wrap this type with `Readonly`, for e
413
413
  type TupleOf<Length extends number, Fill = unknown> = IfNotAnyOrNever<Length, _TupleOf<If<IsNegative<Length>, 0, Length>, Fill, []>, Fill[], []>;
414
414
  type _TupleOf<L extends number, Fill, Accumulator extends UnknownArray> = number extends L ? Fill[] : L extends Accumulator['length'] ? Accumulator : _TupleOf<L, Fill, [...Accumulator, Fill]>;
415
415
  //#endregion
416
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/or.d.ts
416
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/some-extend.d.ts
417
+ /**
418
+ @see {@link SomeExtend}
419
+ */
420
+ type SomeExtendOptions = {
421
+ /**
422
+ Consider `never` elements to match the target type only if the target type itself is `never` (or `any`).
423
+ - 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`).
424
+ - When set to `false`, `never` is treated as a bottom type, and behaves as it normally would.
425
+ @default true
426
+ @example
427
+ ```
428
+ import type {SomeExtend} from 'type-fest';
429
+ type A = SomeExtend<[1, 2, never], string, {strictNever: true}>;
430
+ //=> false
431
+ type B = SomeExtend<[1, 2, never], string, {strictNever: false}>;
432
+ //=> true
433
+ type C = SomeExtend<[1, never], never, {strictNever: true}>;
434
+ //=> true
435
+ type D = SomeExtend<[1, never], never, {strictNever: false}>;
436
+ //=> true
437
+ type E = SomeExtend<[never], any, {strictNever: true}>;
438
+ //=> true
439
+ type F = SomeExtend<[never], any, {strictNever: false}>;
440
+ //=> true
441
+ ```
442
+ */
443
+ strictNever?: boolean;
444
+ };
445
+ type DefaultSomeExtendOptions = {
446
+ strictNever: true;
447
+ };
448
+
449
+ /**
450
+ Returns a boolean for whether some element in an array type extends another type.
451
+
452
+ @example
453
+ ```
454
+ import type {SomeExtend} from 'type-fest';
455
+
456
+ type A = SomeExtend<['1', '2', 3], number>;
457
+ //=> true
458
+
459
+ type B = SomeExtend<[1, 2, 3], string>;
460
+ //=> false
461
+
462
+ type C = SomeExtend<[string, number | string], number>;
463
+ //=> boolean
464
+
465
+ type D = SomeExtend<[true, boolean, true], false>;
466
+ //=> boolean
467
+ ```
468
+
469
+ 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.
470
+
471
+ ```
472
+ // @exactOptionalPropertyTypes: true
473
+ import type {SomeExtend} from 'type-fest';
474
+
475
+ type A = SomeExtend<[1?, 2?, '3'?], string>;
476
+ //=> true
477
+ ```
478
+
479
+ ```
480
+ // @exactOptionalPropertyTypes: false
481
+ import type {SomeExtend} from 'type-fest';
482
+
483
+ type A = SomeExtend<[1?, 2?, '3'?], string>;
484
+ //=> boolean
485
+
486
+ type B = SomeExtend<[1?, 2?, '3'?], string | undefined>;
487
+ //=> true
488
+ ```
489
+
490
+ @see {@link SomeExtendOptions}
491
+
492
+ @category Utilities
493
+ @category Array
494
+ */
495
+ type SomeExtend<TArray extends UnknownArray, Type$1, Options extends SomeExtendOptions = {}> = _SomeExtend<CollapseRestElement<TArray>, Type$1, ApplyDefaultOptions<SomeExtendOptions, DefaultSomeExtendOptions, Options>>;
496
+ type _SomeExtend<TArray extends UnknownArray, Type$1, Options extends Required<SomeExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type$1>, IsAny<Type$1>>, Not<Options['strictNever']>> extends true
497
+ // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, return `true`.
498
+ ? true : _SomeExtend<Rest, Type$1, Options> : First extends Type$1 ? true : _SomeExtend<Rest, Type$1, Options> : false, false, false>;
499
+ //#endregion
500
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/or-all.d.ts
501
+ /**
502
+ Returns a boolean for whether any of the given elements is `true`.
503
+
504
+ Use-cases:
505
+ - Check if at least one condition in a list of booleans is met.
506
+
507
+ @example
508
+ ```
509
+ import type {OrAll} from 'type-fest';
510
+
511
+ type FFT = OrAll<[false, false, true]>;
512
+ //=> true
513
+
514
+ type FFF = OrAll<[false, false, false]>;
515
+ //=> false
516
+ ```
517
+
518
+ Note: When `boolean` is passed as an element, it is distributed into separate cases, and the final result is a union of those cases.
519
+ For example, `OrAll<[false, boolean]>` expands to `OrAll<[false, true]> | OrAll<[false, false]>`, which simplifies to `true | false` (i.e., `boolean`).
520
+
521
+ @example
522
+ ```
523
+ import type {OrAll} from 'type-fest';
524
+
525
+ type A = OrAll<[false, boolean]>;
526
+ //=> boolean
527
+
528
+ type B = OrAll<[true, boolean]>;
529
+ //=> true
530
+ ```
531
+
532
+ Note: If `never` is passed as an element, it is treated as `false` and the result is computed accordingly.
533
+
534
+ @example
535
+ ```
536
+ import type {OrAll} from 'type-fest';
537
+
538
+ type A = OrAll<[never, never, true]>;
539
+ //=> true
540
+
541
+ type B = OrAll<[never, never, false]>;
542
+ //=> false
543
+
544
+ type C = OrAll<[never, never, never]>;
545
+ //=> false
546
+
547
+ type D = OrAll<[never, never, boolean]>;
548
+ //=> boolean
549
+ ```
550
+
551
+ Note: If `any` is passed as an element, it is treated as `boolean` and the result is computed accordingly.
552
+
553
+ @example
554
+ ```
555
+ import type {OrAll} from 'type-fest';
556
+
557
+ type A = OrAll<[false, any]>;
558
+ //=> boolean
559
+
560
+ type B = OrAll<[true, any]>;
561
+ //=> true
562
+ ```
563
+
564
+ 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.).
565
+
566
+ @see {@link Or}
567
+ @see {@link AndAll}
568
+ */
569
+ type OrAll<T extends readonly boolean[]> = SomeExtend<T, true>;
570
+ //#endregion
571
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/or.d.ts
417
572
  /**
418
573
  Returns a boolean for whether either of two given types is true.
419
574
 
@@ -487,15 +642,13 @@ type G = Or<never, never>;
487
642
  //=> false
488
643
  ```
489
644
 
645
+ @see {@link OrAll}
490
646
  @see {@link And}
491
647
  @see {@link Xor}
492
648
  */
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;
649
+ type Or<A$1 extends boolean, B$1 extends boolean> = OrAll<[A$1, B$1]>;
497
650
  //#endregion
498
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/all-extend.d.ts
651
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/all-extend.d.ts
499
652
  /**
500
653
  @see {@link AllExtend}
501
654
  */
@@ -579,11 +732,85 @@ type B = AllExtend<[1?, 2?, 3?], number | undefined>;
579
732
  @category Array
580
733
  */
581
734
  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>;
735
+ type _AllExtend<TArray extends UnknownArray, Type$1, Options extends Required<AllExtendOptions>> = IfNotAnyOrNever<TArray, TArray extends readonly [infer First, ...infer Rest] ? IsNever<First> extends true ? Or<Or<IsNever<Type$1>, IsAny<Type$1>>, Not<Options['strictNever']>> extends true
736
+ // If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, recurse further.
737
+ ? _AllExtend<Rest, Type$1, Options> : false : First extends Type$1 ? _AllExtend<Rest, Type$1, Options> : false : true, false, false>;
738
+ //#endregion
739
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/and-all.d.ts
740
+ /**
741
+ Returns a boolean for whether all of the given elements are `true`.
742
+
743
+ Use-cases:
744
+ - Check if all conditions in a list of booleans are met.
745
+
746
+ @example
747
+ ```
748
+ import type {AndAll} from 'type-fest';
749
+
750
+ type TTT = AndAll<[true, true, true]>;
751
+ //=> true
752
+
753
+ type TTF = AndAll<[true, true, false]>;
754
+ //=> false
755
+
756
+ type TFT = AndAll<[true, false, true]>;
757
+ //=> false
758
+ ```
759
+
760
+ Note: When `boolean` is passed as an element, it is distributed into separate cases, and the final result is a union of those cases.
761
+ For example, `AndAll<[true, boolean]>` expands to `AndAll<[true, true]> | AndAll<[true, false]>`, which simplifies to `true | false` (i.e., `boolean`).
762
+
763
+ @example
764
+ ```
765
+ import type {AndAll} from 'type-fest';
766
+
767
+ type A = AndAll<[true, boolean]>;
768
+ //=> boolean
769
+
770
+ type B = AndAll<[false, boolean]>;
771
+ //=> false
772
+ ```
773
+
774
+ Note: If any of the elements is `never`, the result becomes `false`.
775
+
776
+ @example
777
+ ```
778
+ import type {AndAll} from 'type-fest';
779
+
780
+ type A = AndAll<[true, true, never]>;
781
+ //=> false
782
+
783
+ type B = AndAll<[false, never, never]>;
784
+ //=> false
785
+
786
+ type C = AndAll<[never, never, never]>;
787
+ //=> false
788
+
789
+ type D = AndAll<[boolean, true, never]>;
790
+ //=> false
791
+ ```
792
+
793
+ Note: If `any` is passed as an element, it is treated as `boolean` and the result is computed accordingly.
794
+
795
+ @example
796
+ ```
797
+ import type {AndAll} from 'type-fest';
798
+
799
+ type A = AndAll<[false, any]>;
800
+ //=> false
801
+
802
+ type B = AndAll<[true, any]>;
803
+ //=> boolean
804
+ ```
805
+
806
+ 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.
807
+
808
+ @see {@link And}
809
+ @see {@link OrAll}
810
+ */
811
+ type AndAll<T extends readonly boolean[]> = AllExtend<T, true>;
585
812
  //#endregion
586
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/and.d.ts
813
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/and.d.ts
587
814
  /**
588
815
  Returns a boolean for whether two given types are both true.
589
816
 
@@ -657,23 +884,111 @@ type G = And<never, never>;
657
884
  //=> false
658
885
  ```
659
886
 
887
+ @see {@link AndAll}
660
888
  @see {@link Or}
661
889
  @see {@link Xor}
662
890
  */
663
- type And<A$1 extends boolean, B$1 extends boolean> = AllExtend<[A$1, B$1], true>;
891
+ type And<A$1 extends boolean, B$1 extends boolean> = AndAll<[A$1, B$1]>;
664
892
  //#endregion
665
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/union-to-tuple.d.ts
893
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/exclude-exactly.d.ts
666
894
  /**
667
- Returns the last element of a union type.
895
+ A stricter version of `Exclude<T, U>` that excludes types only when they are exactly identical.
668
896
 
669
897
  @example
670
898
  ```
671
- type Last = LastOfUnion<1 | 2 | 3>;
672
- //=> 3
899
+ import type {ExcludeExactly} from 'type-fest';
900
+
901
+ type TestExclude1 = Exclude<'a' | 'b' | 'c' | 1 | 2 | 3, string>;
902
+ //=> 1 | 2 | 3
903
+
904
+ type TestExcludeExactly1 = ExcludeExactly<'a' | 'b' | 'c' | 1 | 2 | 3, string>;
905
+ //=> 'a' | 'b' | 'c' | 1 | 2 | 3
906
+
907
+ type TestExclude2 = Exclude<'a' | 'b' | 'c' | 1 | 2 | 3, any>;
908
+ //=> never
909
+
910
+ type TestExcludeExactly2 = ExcludeExactly<'a' | 'b' | 'c' | 1 | 2 | 3, any>;
911
+ //=> 'a' | 'b' | 'c' | 1 | 2 | 3
912
+
913
+ type TestExclude3 = Exclude<{a: string} | {a: string; b: string}, {a: string}>;
914
+ //=> never
915
+
916
+ type TestExcludeExactly3 = ExcludeExactly<{a: string} | {a: string; b: string}, {a: string}>;
917
+ //=> {a: string; b: string}
673
918
  ```
919
+
920
+ @category Improved Built-in
674
921
  */
675
- type LastOfUnion<T> = UnionToIntersection<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
922
+ type ExcludeExactly<Union, Delete> = IfNotAnyOrNever<Union, _ExcludeExactly<Union, Delete>,
923
+ // If `Union` is `any`, then if `Delete` is `any`, return `never`, else return `Union`.
924
+ If<IsAny<Delete>, never, Union>,
925
+ // If `Union` is `never`, then if `Delete` is `never`, return `never`, else return `Union`.
926
+ If<IsNever<Delete>, never, Union>>;
927
+ type _ExcludeExactly<Union, Delete> = IfNotAnyOrNever<Delete, Union extends unknown // For distributing `Union`
928
+ ? [Delete extends unknown // For distributing `Delete`
929
+ ? If<IsEqual<Union, Delete>, true, never> : never] extends [never] ? Union : never : never,
930
+ // If `Delete` is `any` or `never`, then return `Union`,
931
+ // because `Union` cannot be `any` or `never` here.
932
+ Union, Union>;
933
+ //#endregion
934
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/union-member.d.ts
935
+ /**
936
+ Returns an arbitrary member of a union type.
937
+
938
+ Use-cases:
939
+ - Implementing recursive type functions that accept a union type.
940
+
941
+ @example
942
+ ```
943
+ import type {UnionMember, IsNever} from 'type-fest';
944
+
945
+ type UnionLength<T, Acc extends any[] = []> =
946
+ UnionMember<T> extends infer Member
947
+ ? IsNever<Member> extends false
948
+ ? UnionLength<Exclude<T, Member>, [...Acc, Member]>
949
+ : Acc['length']
950
+ : never;
676
951
 
952
+ type T1 = UnionLength<'foo' | 'bar' | 'baz'>;
953
+ //=> 3
954
+
955
+ type T2 = UnionLength<{a: string}>;
956
+ //=> 1
957
+ ```
958
+
959
+ - Picking an arbitrary member from a union
960
+
961
+ @example
962
+ ```
963
+ import type {UnionMember, Primitive, LiteralToPrimitive} from 'type-fest';
964
+
965
+ type IsHomogenous<T extends Primitive> = [T] extends [LiteralToPrimitive<UnionMember<T>>] ? true : false;
966
+
967
+ type T1 = IsHomogenous<1 | 2 | 3 | 4>;
968
+ //=> true
969
+
970
+ type T2 = IsHomogenous<'foo' | 'bar'>;
971
+ //=> true
972
+
973
+ type T3 = IsHomogenous<'foo' | 'bar' | 1>;
974
+ //=> false
975
+ ```
976
+
977
+ Returns `never` when the input is `never`.
978
+
979
+ @example
980
+ ```
981
+ import type {UnionMember} from 'type-fest';
982
+
983
+ type LastNever = UnionMember<never>;
984
+ //=> never
985
+ ```
986
+
987
+ @category Type
988
+ */
989
+ type UnionMember<T> = IsNever<T> extends true ? never : UnionToIntersection<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
990
+ //#endregion
991
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/union-to-tuple.d.ts
677
992
  /**
678
993
  Convert a union type into an unordered tuple type of its elements.
679
994
 
@@ -709,9 +1024,9 @@ const petList = Object.keys(pets) as UnionToTuple<Pet>;
709
1024
 
710
1025
  @category Array
711
1026
  */
712
- type UnionToTuple<T, L = LastOfUnion<T>> = IsNever<T> extends false ? [...UnionToTuple<Exclude<T, L>>, L] : [];
1027
+ type UnionToTuple<T, L = UnionMember<T>> = IsNever<T> extends false ? [...UnionToTuple<ExcludeExactly<T, L>>, L] : [];
713
1028
  //#endregion
714
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/set-optional.d.ts
1029
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/set-optional.d.ts
715
1030
  /**
716
1031
  Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the `SetRequired` type.
717
1032
 
@@ -728,11 +1043,7 @@ type Foo = {
728
1043
  };
729
1044
 
730
1045
  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
- // }
1046
+ //=> {a: number; b?: string; c?: boolean}
736
1047
  ```
737
1048
 
738
1049
  @category Object
@@ -745,7 +1056,7 @@ Except<BaseType, Keys> &
745
1056
  // Pick the keys that should be mutable from the base type and make them mutable.
746
1057
  Partial<HomomorphicPick<BaseType, Keys>>> : never;
747
1058
  //#endregion
748
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/split.d.ts
1059
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/split.d.ts
749
1060
  /**
750
1061
  Split options.
751
1062
 
@@ -804,7 +1115,7 @@ type SplitHelper<S extends string, Delimiter extends string, Options extends Req
804
1115
  : string[] : never // Should never happen
805
1116
  : never; // Should never happen
806
1117
  //#endregion
807
- //#region node_modules/.pnpm/type-fest@5.4.4/node_modules/type-fest/source/replace.d.ts
1118
+ //#region node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/replace.d.ts
808
1119
  type ReplaceOptions = {
809
1120
  all?: boolean;
810
1121
  };
@@ -2631,13 +2942,6 @@ declare function objectValues<O extends PlainObject>(plainObject: O): O[keyof O]
2631
2942
  declare function objectValues<O extends AnyObject>(anyObject: O): O[keyof O][];
2632
2943
  //#endregion
2633
2944
  //#region src/utils/string/stringInitialCase.d.ts
2634
- /**
2635
- * 字符串首字母大小写
2636
- * - 包含非西欧字母字符时,不处理
2637
- * - 纯字母且全大写时,不处理
2638
- * - 纯字母且非全大写时,首字母小写,其余保留
2639
- * - 纯字母且非全大写时,首字母大写,其余保留
2640
- *
2641
2945
  /**
2642
2946
  * 字符串首字母大小写
2643
2947
  * - 包含非西欧字母字符时,不处理
@@ -2657,10 +2961,6 @@ declare function objectValues<O extends AnyObject>(anyObject: O): O[keyof O][];
2657
2961
  declare function stringInitialCase(input: string, caseType?: "lower" | "upper" | undefined): string;
2658
2962
  //#endregion
2659
2963
  //#region src/utils/string/stringReplace.d.ts
2660
- /**
2661
- * 字符串替换
2662
- * - 替换第一个匹配项
2663
- *
2664
2964
  /**
2665
2965
  * 字符串替换
2666
2966
  * - 替换第一个匹配项
@@ -2693,9 +2993,6 @@ declare function stringReplace<I$1 extends string, S extends string, R$1 extends
2693
2993
  declare function stringTemplate(input: string, template: PlainObject, regex?: RegExp): string;
2694
2994
  //#endregion
2695
2995
  //#region src/utils/string/stringToJson.d.ts
2696
- /**
2697
- * 处理 JSON 字符串
2698
- *
2699
2996
  /**
2700
2997
  * 处理 JSON 字符串
2701
2998
  *
@@ -2710,6 +3007,24 @@ declare function stringTemplate(input: string, template: PlainObject, regex?: Re
2710
3007
  */
2711
3008
  declare function stringToJson<D extends AnyObject = AnyObject>(input: string | null | undefined, safeValue: D): D;
2712
3009
  //#endregion
3010
+ //#region src/utils/string/stringToLowerCase.d.ts
3011
+ /**
3012
+ * 将字符串转换为小写
3013
+ * - 将字符串字面量类型转换为其小写形式
3014
+ * - 当输入无效时,返回空字符串
3015
+ *
3016
+ * @param input 待处理字符串
3017
+ * @returns 转换后的小写字符串类型,如果输入无效则返回空字符串类型 ""
3018
+ * @example
3019
+ * ```ts
3020
+ * stringToLowerCase("HELLO"); // 类型为 "hello"
3021
+ * stringToLowerCase(someUnknownString); // 类型为 string
3022
+ * stringToLowerCase(null); // 类型为 ""
3023
+ * ```
3024
+ */
3025
+ declare function stringToLowerCase<const T extends string>(input: T): Lowercase<T>;
3026
+ declare function stringToLowerCase(input: unknown): "";
3027
+ //#endregion
2713
3028
  //#region src/utils/string/stringToNumber.d.ts
2714
3029
  /**
2715
3030
  * 从字符串中提取数字字符串
@@ -2754,6 +3069,24 @@ declare function stringToNumber(input: string): string;
2754
3069
  */
2755
3070
  declare function stringToPosix(input: string | null | undefined, removeLeadingSlash?: boolean): string;
2756
3071
  //#endregion
3072
+ //#region src/utils/string/stringToUpperCase.d.ts
3073
+ /**
3074
+ * 将字符串转换为大写
3075
+ * - 将字符串字面量类型转换为其大写形式
3076
+ * - 当输入无效时,返回空字符串
3077
+ *
3078
+ * @param input 待处理字符串
3079
+ * @returns 转换后的大写字符串,如果输入无效则返回空字符串
3080
+ * @example
3081
+ * ```ts
3082
+ * stringToUpperCase("hello"); // 类型为 "HELLO"
3083
+ * stringToUpperCase(someUnknownString); // 类型为 string
3084
+ * stringToUpperCase(null); // 类型为 ""
3085
+ * ```
3086
+ */
3087
+ declare function stringToUpperCase<const T extends string>(input: T): Uppercase<T>;
3088
+ declare function stringToUpperCase(input: unknown): "";
3089
+ //#endregion
2757
3090
  //#region src/utils/string/stringToValues.d.ts
2758
3091
  /**
2759
3092
  * 字符串分割为数组
@@ -3298,7 +3631,7 @@ declare function isWeakSet(value: unknown): value is WeakSet<AnyObject>;
3298
3631
  * 检查 value 是否为 string 类型
3299
3632
  *
3300
3633
  * @param value 待检查值
3301
- * @param checkEmpty 是否排除空字符串
3634
+ * @param checkEmpty 是否检查空字符串
3302
3635
  * @returns 是否为字符串
3303
3636
  * @example
3304
3637
  * ```ts
@@ -3349,5 +3682,5 @@ declare function isWebSocket(value: unknown): value is WebSocket;
3349
3682
  */
3350
3683
  declare function isWindow(value: unknown): value is Window;
3351
3684
  //#endregion
3352
- 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, stringToNumber, stringToPosix, stringToValues, stringTrim, stringTruncate, to, treeFilter, treeFind, treeForEach, treeMap, treeToRows };
3685
+ 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 };
3353
3686
  //# sourceMappingURL=index.d.ts.map