@stryke/types 0.10.23 → 0.10.25
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/array.d.cts +122 -2
- package/dist/array.d.cts.map +1 -0
- package/dist/array.d.mts +122 -2
- package/dist/array.d.mts.map +1 -0
- package/dist/async.d.cts +111 -2
- package/dist/async.d.cts.map +1 -0
- package/dist/async.d.mts +111 -2
- package/dist/async.d.mts.map +1 -0
- package/dist/base.cjs +3 -1
- package/dist/base.d.cts +331 -2
- package/dist/base.d.cts.map +1 -0
- package/dist/base.d.mts +331 -2
- package/dist/base.d.mts.map +1 -0
- package/dist/base.mjs +3 -1
- package/dist/base.mjs.map +1 -0
- package/dist/configuration.d.cts +71 -2
- package/dist/configuration.d.cts.map +1 -0
- package/dist/configuration.d.mts +71 -2
- package/dist/configuration.d.mts.map +1 -0
- package/dist/file.d.cts +51 -2
- package/dist/file.d.cts.map +1 -0
- package/dist/file.d.mts +51 -2
- package/dist/file.d.mts.map +1 -0
- package/dist/form.d.cts +40 -2
- package/dist/form.d.cts.map +1 -0
- package/dist/form.d.mts +40 -2
- package/dist/form.d.mts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -18
- package/dist/index.d.mts +19 -18
- package/dist/index.mjs +1 -1
- package/dist/json.d.cts +70 -2
- package/dist/json.d.cts.map +1 -0
- package/dist/json.d.mts +70 -2
- package/dist/json.d.mts.map +1 -0
- package/dist/logic.d.cts +124 -2
- package/dist/logic.d.cts.map +1 -0
- package/dist/logic.d.mts +124 -2
- package/dist/logic.d.mts.map +1 -0
- package/dist/messages.d.cts +21 -2
- package/dist/messages.d.cts.map +1 -0
- package/dist/messages.d.mts +21 -2
- package/dist/messages.d.mts.map +1 -0
- package/dist/navigator.d.cts +42 -2
- package/dist/navigator.d.cts.map +1 -0
- package/dist/navigator.d.mts +42 -2
- package/dist/navigator.d.mts.map +1 -0
- package/dist/number.d.cts +181 -2
- package/dist/number.d.cts.map +1 -0
- package/dist/number.d.mts +181 -2
- package/dist/number.d.mts.map +1 -0
- package/dist/object.d.cts +394 -2
- package/dist/object.d.cts.map +1 -0
- package/dist/object.d.mts +394 -2
- package/dist/object.d.mts.map +1 -0
- package/dist/package-json.d.cts +261 -2
- package/dist/package-json.d.cts.map +1 -0
- package/dist/package-json.d.mts +261 -2
- package/dist/package-json.d.mts.map +1 -0
- package/dist/package-manager.d.cts +6 -2
- package/dist/package-manager.d.cts.map +1 -0
- package/dist/package-manager.d.mts +6 -2
- package/dist/package-manager.d.mts.map +1 -0
- package/dist/string.d.cts +81 -2
- package/dist/string.d.cts.map +1 -0
- package/dist/string.d.mts +81 -2
- package/dist/string.d.mts.map +1 -0
- package/dist/system.d.cts +5 -2
- package/dist/system.d.cts.map +1 -0
- package/dist/system.d.mts +5 -2
- package/dist/system.d.mts.map +1 -0
- package/dist/tsconfig.d.cts +803 -2
- package/dist/tsconfig.d.cts.map +1 -0
- package/dist/tsconfig.d.mts +803 -2
- package/dist/tsconfig.d.mts.map +1 -0
- package/dist/user.d.cts +29 -2
- package/dist/user.d.cts.map +1 -0
- package/dist/user.d.mts +29 -2
- package/dist/user.d.mts.map +1 -0
- package/dist/utilities.d.cts +51 -2
- package/dist/utilities.d.cts.map +1 -0
- package/dist/utilities.d.mts +51 -2
- package/dist/utilities.d.mts.map +1 -0
- package/dist/validations.d.cts +21 -2
- package/dist/validations.d.cts.map +1 -0
- package/dist/validations.d.mts +21 -2
- package/dist/validations.d.mts.map +1 -0
- package/package.json +3 -3
- package/dist/array-DVtfX_TI.d.mts +0 -122
- package/dist/array-DVtfX_TI.d.mts.map +0 -1
- package/dist/array-DtIKbcDr.d.cts +0 -122
- package/dist/array-DtIKbcDr.d.cts.map +0 -1
- package/dist/async-BtPWg6IL.d.mts +0 -111
- package/dist/async-BtPWg6IL.d.mts.map +0 -1
- package/dist/async-eKWh-_sF.d.cts +0 -111
- package/dist/async-eKWh-_sF.d.cts.map +0 -1
- package/dist/base-CiIyKS-b.d.mts +0 -331
- package/dist/base-CiIyKS-b.d.mts.map +0 -1
- package/dist/base-Cpeh4C5c.cjs +0 -3
- package/dist/base-DmFPRVSE.mjs +0 -3
- package/dist/base-DmFPRVSE.mjs.map +0 -1
- package/dist/base-EF17pdAI.d.cts +0 -331
- package/dist/base-EF17pdAI.d.cts.map +0 -1
- package/dist/configuration-5Q2wg3Id.d.mts +0 -71
- package/dist/configuration-5Q2wg3Id.d.mts.map +0 -1
- package/dist/configuration-Dvz7q6dd.d.cts +0 -71
- package/dist/configuration-Dvz7q6dd.d.cts.map +0 -1
- package/dist/file-dM8RAMNC.d.cts +0 -51
- package/dist/file-dM8RAMNC.d.cts.map +0 -1
- package/dist/file-eWushyiM.d.mts +0 -51
- package/dist/file-eWushyiM.d.mts.map +0 -1
- package/dist/form-mTzpZCeA.d.cts +0 -40
- package/dist/form-mTzpZCeA.d.cts.map +0 -1
- package/dist/form-sNCVXIEk.d.mts +0 -40
- package/dist/form-sNCVXIEk.d.mts.map +0 -1
- package/dist/json-BlaU0Pbq.d.cts +0 -70
- package/dist/json-BlaU0Pbq.d.cts.map +0 -1
- package/dist/json-C3wqh2t3.d.mts +0 -70
- package/dist/json-C3wqh2t3.d.mts.map +0 -1
- package/dist/logic-BoEG5A3-.d.cts +0 -374
- package/dist/logic-BoEG5A3-.d.cts.map +0 -1
- package/dist/logic-h9Jrrpsk.d.mts +0 -374
- package/dist/logic-h9Jrrpsk.d.mts.map +0 -1
- package/dist/messages-Bxu_o13x.d.mts +0 -21
- package/dist/messages-Bxu_o13x.d.mts.map +0 -1
- package/dist/messages-PtLJRJeN.d.cts +0 -21
- package/dist/messages-PtLJRJeN.d.cts.map +0 -1
- package/dist/navigator-DLpMW73v.d.mts +0 -42
- package/dist/navigator-DLpMW73v.d.mts.map +0 -1
- package/dist/navigator-wsxMUGqK.d.cts +0 -42
- package/dist/navigator-wsxMUGqK.d.cts.map +0 -1
- package/dist/object-B3Rc0f80.d.mts +0 -392
- package/dist/object-B3Rc0f80.d.mts.map +0 -1
- package/dist/object-DyLgFijN.d.cts +0 -392
- package/dist/object-DyLgFijN.d.cts.map +0 -1
- package/dist/package-json-BYMmXu4B.d.mts +0 -261
- package/dist/package-json-BYMmXu4B.d.mts.map +0 -1
- package/dist/package-json-DMeUqEmW.d.cts +0 -261
- package/dist/package-json-DMeUqEmW.d.cts.map +0 -1
- package/dist/package-manager-PRcovqs-.d.mts +0 -6
- package/dist/package-manager-PRcovqs-.d.mts.map +0 -1
- package/dist/package-manager-tcG2TLVT.d.cts +0 -6
- package/dist/package-manager-tcG2TLVT.d.cts.map +0 -1
- package/dist/system-BxYi2_rE.d.mts +0 -5
- package/dist/system-BxYi2_rE.d.mts.map +0 -1
- package/dist/system-n1LPjzuJ.d.cts +0 -5
- package/dist/system-n1LPjzuJ.d.cts.map +0 -1
- package/dist/tsconfig-C6dWY2RO.d.cts +0 -803
- package/dist/tsconfig-C6dWY2RO.d.cts.map +0 -1
- package/dist/tsconfig-CUKA7cEN.d.mts +0 -803
- package/dist/tsconfig-CUKA7cEN.d.mts.map +0 -1
- package/dist/user-CkdO4wnf.d.mts +0 -29
- package/dist/user-CkdO4wnf.d.mts.map +0 -1
- package/dist/user-CovHR6Ne.d.cts +0 -29
- package/dist/user-CovHR6Ne.d.cts.map +0 -1
- package/dist/utilities-BVS-gcgS.d.mts +0 -51
- package/dist/utilities-BVS-gcgS.d.mts.map +0 -1
- package/dist/utilities-Jb4ggdM-.d.cts +0 -51
- package/dist/utilities-Jb4ggdM-.d.cts.map +0 -1
- package/dist/validations-C_7osVpS.d.mts +0 -21
- package/dist/validations-C_7osVpS.d.mts.map +0 -1
- package/dist/validations-CvwxY4RE.d.cts +0 -21
- package/dist/validations-CvwxY4RE.d.cts.map +0 -1
package/dist/array.d.cts
CHANGED
|
@@ -1,2 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Matches any array or array-like object.
|
|
4
|
+
*/
|
|
5
|
+
type Arrayable<T> = T | T[];
|
|
6
|
+
type UnknownArray = readonly unknown[];
|
|
7
|
+
/**
|
|
8
|
+
* Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
|
|
9
|
+
*/
|
|
10
|
+
type TypedArray = BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;
|
|
11
|
+
/**
|
|
12
|
+
* Infer the length of the given array `<T>`.
|
|
13
|
+
*
|
|
14
|
+
* Check out {@link https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f | this article} for more information.
|
|
15
|
+
*/
|
|
16
|
+
type ArrayLength<T extends readonly unknown[]> = T extends {
|
|
17
|
+
readonly length: infer L;
|
|
18
|
+
} ? L : never;
|
|
19
|
+
/**
|
|
20
|
+
* Extract the element of an array that also works for array union.
|
|
21
|
+
*
|
|
22
|
+
* Returns `never` if T is not an array.
|
|
23
|
+
*
|
|
24
|
+
* It creates a type-safe way to access the element type of `unknown` type.
|
|
25
|
+
*/
|
|
26
|
+
type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
|
|
27
|
+
/**
|
|
28
|
+
* Provides all values for a constant array or tuple.
|
|
29
|
+
*
|
|
30
|
+
* Use-case: This type is useful when working with constant arrays or tuples and you want to enforce type-safety with their values.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```
|
|
34
|
+
* import type {ArrayValues, ArrayIndices} from 'type-fest';
|
|
35
|
+
*
|
|
36
|
+
* const weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as const;
|
|
37
|
+
*
|
|
38
|
+
* type WeekdayName = ArrayValues<typeof weekdays>;
|
|
39
|
+
* type Weekday = ArrayIndices<typeof weekdays>;
|
|
40
|
+
*
|
|
41
|
+
* const getWeekdayName = (day: Weekday): WeekdayName => weekdays[day];
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link ArrayIndices}
|
|
45
|
+
*/
|
|
46
|
+
type ArrayValues<T extends readonly unknown[]> = T[number];
|
|
47
|
+
/**
|
|
48
|
+
* Provides valid indices for a constant array or tuple.
|
|
49
|
+
*
|
|
50
|
+
* Use-case: This type is useful when working with constant arrays or tuples and you want to enforce type-safety for accessing elements by their indices.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```
|
|
54
|
+
* import type {ArrayIndices, ArrayValues} from 'type-fest';
|
|
55
|
+
*
|
|
56
|
+
* const weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as const;
|
|
57
|
+
*
|
|
58
|
+
* type Weekday = ArrayIndices<typeof weekdays>;
|
|
59
|
+
* type WeekdayName = ArrayValues<typeof weekdays>;
|
|
60
|
+
*
|
|
61
|
+
* const getWeekdayName = (day: Weekday): WeekdayName => weekdays[day];
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @see {@link ArrayValues}
|
|
65
|
+
*/
|
|
66
|
+
type ArrayIndices<Element extends readonly unknown[]> = Exclude<Partial<Element>["length"], Element["length"]>;
|
|
67
|
+
/**
|
|
68
|
+
* Matches any unknown array or tuple.
|
|
69
|
+
*/
|
|
70
|
+
type UnknownArrayOrTuple = readonly [...unknown[]];
|
|
71
|
+
/**
|
|
72
|
+
* Extracts the type of the first element of an array or tuple.
|
|
73
|
+
*/
|
|
74
|
+
type FirstArrayElement<TArray extends UnknownArrayOrTuple> = TArray extends readonly [infer THead, ...unknown[]] ? THead : never;
|
|
75
|
+
/**
|
|
76
|
+
* Extracts the type of the last element of an array.
|
|
77
|
+
*
|
|
78
|
+
* Use-case: Defining the return type of functions that extract the last element of an array, for example [`lodash.last`](https://lodash.com/docs/4.17.15#last).
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```
|
|
82
|
+
* import type {LastArrayElement} from 'type-fest';
|
|
83
|
+
*
|
|
84
|
+
* declare function lastOf<V extends readonly any[]>(array: V): LastArrayElement<V>;
|
|
85
|
+
*
|
|
86
|
+
* const array = ['foo', 2];
|
|
87
|
+
*
|
|
88
|
+
* typeof lastOf(array);
|
|
89
|
+
* //=> number
|
|
90
|
+
*
|
|
91
|
+
* const array = ['foo', 2] as const;
|
|
92
|
+
*
|
|
93
|
+
* typeof lastOf(array);
|
|
94
|
+
* //=> 2
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
type LastArrayElement<Elements extends readonly unknown[], ElementBeforeTailingSpreadElement = never> = Elements extends readonly [] ? ElementBeforeTailingSpreadElement : Elements extends readonly [...infer _U, infer V] ? V : Elements extends readonly [infer U, ...infer V] ? LastArrayElement<V, U> : Elements extends readonly (infer U)[] ? ElementBeforeTailingSpreadElement | U : never;
|
|
98
|
+
/**
|
|
99
|
+
* Returns the static, fixed-length portion of the given array, excluding variable-length parts.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```
|
|
103
|
+
* type A = [string, number, boolean, ...string[]];
|
|
104
|
+
* type B = StaticPartOfArray<A>;
|
|
105
|
+
* //=> [string, number, boolean]
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
type StaticPartOfArray<T extends UnknownArray, Result extends UnknownArray = []> = T extends unknown ? number extends T["length"] ? T extends readonly [infer U, ...infer V] ? StaticPartOfArray<V, [...Result, U]> : Result : T : never;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the variable, non-fixed-length portion of the given array, excluding static-length parts.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```
|
|
114
|
+
* type A = [string, number, boolean, ...string[]];
|
|
115
|
+
* type B = VariablePartOfArray<A>;
|
|
116
|
+
* //=> string[]
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
type VariablePartOfArray<T extends UnknownArray> = T extends unknown ? T extends readonly [...StaticPartOfArray<T>, ...infer U] ? U : [] : never;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { ArrayElement, ArrayIndices, ArrayLength, ArrayValues, Arrayable, FirstArrayElement, LastArrayElement, StaticPartOfArray, TypedArray, UnknownArray, UnknownArrayOrTuple, VariablePartOfArray };
|
|
122
|
+
//# sourceMappingURL=array.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.cts","names":[],"sources":["../src/array.ts"],"sourcesContent":[],"mappings":";;AAqBA;AAEA;AAKY,KAPA,SAOU,CAAA,CAAA,CAAA,GAPK,CAOL,GAPS,CAOT,EAAA;AAClB,KANQ,YAAA,GAMR,SAAA,OAAA,EAAA;;;;AAIA,KALQ,UAAA,GACR,aAIA,GAHA,cAGA,GAFA,YAEA,GADA,YACA,GAAA,SAAA,GACA,UADA,GAEA,UAFA,GAGA,UAHA,GAIA,iBAJA,GAKA,WALA,GAMA,WANA;;;;;;AAMA,KAOQ,WAPR,CAAA,UAAA,SAAA,OAAA,EAAA,CAAA,GAOoD,CAPpD,SAAA;EAAW,SAAA,MAAA,EAAA,KAAA,EAAA;AAOf,CAAA,GAAY,CAAA,GAAA,KAAA;AAaZ;AAqBA;AAqBA;;;;;AAAsE,KA1C1D,YA0C0D,CAAA,CAAA,CAAA,GA1CxC,CA0CwC,SAAA,SAAA,OAAA,EAAA,GA1CT,CA0CS,CAAA,CAAA,CAAA,GAAA,KAAA;AAQtE;AAKA;AAyBA;;;;;;;;;;;;AA2BA;;;;;AAKM,KA3FM,WA2FN,CAAA,UAAA,SAAA,OAAA,EAAA,CAAA,GA3FkD,CA2FlD,CAAA,MAAA,CAAA;;;;;;;;AAgBN;;;;;;;;;;;;KAtFY,mDAAmD,QAC7D,QAAQ,oBACR;;;;KAMU,mBAAA;;;;KAKA,iCAAiC,uBAC3C;;;;;;;;;;;;;;;;;;;;;;;KAwBU,mGAKV,+BACI,oCACA,uDAEE,kDAGE,iBAAiB,GAAG,KACpB,wCACE,oCAAoC;;;;;;;;;;;KAapC,4BACA,6BACK,qBACb,mCACe,cACb,2CACE,kBAAkB,OAAO,QAAQ,MACjC,SACF;;;;;;;;;;;KAaM,8BAA8B,gBAAgB,oBACtD,uBAAuB,kBAAkB"}
|
package/dist/array.d.mts
CHANGED
|
@@ -1,2 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/array.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Matches any array or array-like object.
|
|
4
|
+
*/
|
|
5
|
+
type Arrayable<T> = T | T[];
|
|
6
|
+
type UnknownArray = readonly unknown[];
|
|
7
|
+
/**
|
|
8
|
+
* Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
|
|
9
|
+
*/
|
|
10
|
+
type TypedArray = BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;
|
|
11
|
+
/**
|
|
12
|
+
* Infer the length of the given array `<T>`.
|
|
13
|
+
*
|
|
14
|
+
* Check out {@link https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f | this article} for more information.
|
|
15
|
+
*/
|
|
16
|
+
type ArrayLength<T extends readonly unknown[]> = T extends {
|
|
17
|
+
readonly length: infer L;
|
|
18
|
+
} ? L : never;
|
|
19
|
+
/**
|
|
20
|
+
* Extract the element of an array that also works for array union.
|
|
21
|
+
*
|
|
22
|
+
* Returns `never` if T is not an array.
|
|
23
|
+
*
|
|
24
|
+
* It creates a type-safe way to access the element type of `unknown` type.
|
|
25
|
+
*/
|
|
26
|
+
type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
|
|
27
|
+
/**
|
|
28
|
+
* Provides all values for a constant array or tuple.
|
|
29
|
+
*
|
|
30
|
+
* Use-case: This type is useful when working with constant arrays or tuples and you want to enforce type-safety with their values.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```
|
|
34
|
+
* import type {ArrayValues, ArrayIndices} from 'type-fest';
|
|
35
|
+
*
|
|
36
|
+
* const weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as const;
|
|
37
|
+
*
|
|
38
|
+
* type WeekdayName = ArrayValues<typeof weekdays>;
|
|
39
|
+
* type Weekday = ArrayIndices<typeof weekdays>;
|
|
40
|
+
*
|
|
41
|
+
* const getWeekdayName = (day: Weekday): WeekdayName => weekdays[day];
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link ArrayIndices}
|
|
45
|
+
*/
|
|
46
|
+
type ArrayValues<T extends readonly unknown[]> = T[number];
|
|
47
|
+
/**
|
|
48
|
+
* Provides valid indices for a constant array or tuple.
|
|
49
|
+
*
|
|
50
|
+
* Use-case: This type is useful when working with constant arrays or tuples and you want to enforce type-safety for accessing elements by their indices.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```
|
|
54
|
+
* import type {ArrayIndices, ArrayValues} from 'type-fest';
|
|
55
|
+
*
|
|
56
|
+
* const weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as const;
|
|
57
|
+
*
|
|
58
|
+
* type Weekday = ArrayIndices<typeof weekdays>;
|
|
59
|
+
* type WeekdayName = ArrayValues<typeof weekdays>;
|
|
60
|
+
*
|
|
61
|
+
* const getWeekdayName = (day: Weekday): WeekdayName => weekdays[day];
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @see {@link ArrayValues}
|
|
65
|
+
*/
|
|
66
|
+
type ArrayIndices<Element extends readonly unknown[]> = Exclude<Partial<Element>["length"], Element["length"]>;
|
|
67
|
+
/**
|
|
68
|
+
* Matches any unknown array or tuple.
|
|
69
|
+
*/
|
|
70
|
+
type UnknownArrayOrTuple = readonly [...unknown[]];
|
|
71
|
+
/**
|
|
72
|
+
* Extracts the type of the first element of an array or tuple.
|
|
73
|
+
*/
|
|
74
|
+
type FirstArrayElement<TArray extends UnknownArrayOrTuple> = TArray extends readonly [infer THead, ...unknown[]] ? THead : never;
|
|
75
|
+
/**
|
|
76
|
+
* Extracts the type of the last element of an array.
|
|
77
|
+
*
|
|
78
|
+
* Use-case: Defining the return type of functions that extract the last element of an array, for example [`lodash.last`](https://lodash.com/docs/4.17.15#last).
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```
|
|
82
|
+
* import type {LastArrayElement} from 'type-fest';
|
|
83
|
+
*
|
|
84
|
+
* declare function lastOf<V extends readonly any[]>(array: V): LastArrayElement<V>;
|
|
85
|
+
*
|
|
86
|
+
* const array = ['foo', 2];
|
|
87
|
+
*
|
|
88
|
+
* typeof lastOf(array);
|
|
89
|
+
* //=> number
|
|
90
|
+
*
|
|
91
|
+
* const array = ['foo', 2] as const;
|
|
92
|
+
*
|
|
93
|
+
* typeof lastOf(array);
|
|
94
|
+
* //=> 2
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
type LastArrayElement<Elements extends readonly unknown[], ElementBeforeTailingSpreadElement = never> = Elements extends readonly [] ? ElementBeforeTailingSpreadElement : Elements extends readonly [...infer _U, infer V] ? V : Elements extends readonly [infer U, ...infer V] ? LastArrayElement<V, U> : Elements extends readonly (infer U)[] ? ElementBeforeTailingSpreadElement | U : never;
|
|
98
|
+
/**
|
|
99
|
+
* Returns the static, fixed-length portion of the given array, excluding variable-length parts.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```
|
|
103
|
+
* type A = [string, number, boolean, ...string[]];
|
|
104
|
+
* type B = StaticPartOfArray<A>;
|
|
105
|
+
* //=> [string, number, boolean]
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
type StaticPartOfArray<T extends UnknownArray, Result extends UnknownArray = []> = T extends unknown ? number extends T["length"] ? T extends readonly [infer U, ...infer V] ? StaticPartOfArray<V, [...Result, U]> : Result : T : never;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the variable, non-fixed-length portion of the given array, excluding static-length parts.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```
|
|
114
|
+
* type A = [string, number, boolean, ...string[]];
|
|
115
|
+
* type B = VariablePartOfArray<A>;
|
|
116
|
+
* //=> string[]
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
type VariablePartOfArray<T extends UnknownArray> = T extends unknown ? T extends readonly [...StaticPartOfArray<T>, ...infer U] ? U : [] : never;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { ArrayElement, ArrayIndices, ArrayLength, ArrayValues, Arrayable, FirstArrayElement, LastArrayElement, StaticPartOfArray, TypedArray, UnknownArray, UnknownArrayOrTuple, VariablePartOfArray };
|
|
122
|
+
//# sourceMappingURL=array.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.mts","names":[],"sources":["../src/array.ts"],"sourcesContent":[],"mappings":";;AAqBA;AAEA;AAKY,KAPA,SAOU,CAAA,CAAA,CAAA,GAPK,CAOL,GAPS,CAOT,EAAA;AAClB,KANQ,YAAA,GAMR,SAAA,OAAA,EAAA;;;;AAIA,KALQ,UAAA,GACR,aAIA,GAHA,cAGA,GAFA,YAEA,GADA,YACA,GAAA,SAAA,GACA,UADA,GAEA,UAFA,GAGA,UAHA,GAIA,iBAJA,GAKA,WALA,GAMA,WANA;;;;;;AAMA,KAOQ,WAPR,CAAA,UAAA,SAAA,OAAA,EAAA,CAAA,GAOoD,CAPpD,SAAA;EAAW,SAAA,MAAA,EAAA,KAAA,EAAA;AAOf,CAAA,GAAY,CAAA,GAAA,KAAA;AAaZ;AAqBA;AAqBA;;;;;AAAsE,KA1C1D,YA0C0D,CAAA,CAAA,CAAA,GA1CxC,CA0CwC,SAAA,SAAA,OAAA,EAAA,GA1CT,CA0CS,CAAA,CAAA,CAAA,GAAA,KAAA;AAQtE;AAKA;AAyBA;;;;;;;;;;;;AA2BA;;;;;AAKM,KA3FM,WA2FN,CAAA,UAAA,SAAA,OAAA,EAAA,CAAA,GA3FkD,CA2FlD,CAAA,MAAA,CAAA;;;;;;;;AAgBN;;;;;;;;;;;;KAtFY,mDAAmD,QAC7D,QAAQ,oBACR;;;;KAMU,mBAAA;;;;KAKA,iCAAiC,uBAC3C;;;;;;;;;;;;;;;;;;;;;;;KAwBU,mGAKV,+BACI,oCACA,uDAEE,kDAGE,iBAAiB,GAAG,KACpB,wCACE,oCAAoC;;;;;;;;;;;KAapC,4BACA,6BACK,qBACb,mCACe,cACb,2CACE,kBAAkB,OAAO,QAAQ,MACjC,SACF;;;;;;;;;;;KAaM,8BAA8B,gBAAgB,oBACtD,uBAAuB,kBAAkB"}
|
package/dist/async.d.cts
CHANGED
|
@@ -1,2 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FunctionLike, IsUnknown } from "./base.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/async.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Get the type of the value that a promise resolves to.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```
|
|
10
|
+
* import type {Awaited} from 'type-fest';
|
|
11
|
+
*
|
|
12
|
+
* const value: Awaited<Promise<string>> = 'foo';
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
type Awaitable<T> = T | PromiseLike<T>;
|
|
16
|
+
/**
|
|
17
|
+
* A type that can be either a value or a function that returns a value.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```
|
|
21
|
+
* import type {Resolvable} from 'type-fest';
|
|
22
|
+
*
|
|
23
|
+
* const foo: Resolvable<string> = 'bar';
|
|
24
|
+
* const bar: Resolvable<string> = () => 'baz';
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
type Resolvable<T> = Awaitable<T> | (() => Awaitable<T>);
|
|
28
|
+
/**
|
|
29
|
+
* Create a function type with a return type of your choice and the same parameters as the given function type.
|
|
30
|
+
*
|
|
31
|
+
* Use-case: You want to define a wrapped function that returns something different while receiving the same parameters. For example, you might want to wrap a function that can throw an error into one that will return `undefined` instead.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```
|
|
35
|
+
* import type {SetReturnType} from 'type-fest';
|
|
36
|
+
*
|
|
37
|
+
* type MyFunctionThatCanThrow = (foo: SomeType, bar: unknown) => SomeOtherType;
|
|
38
|
+
*
|
|
39
|
+
* type MyWrappedFunction = SetReturnType<MyFunctionThatCanThrow, SomeOtherType | undefined>;
|
|
40
|
+
* //=> type MyWrappedFunction = (foo: SomeType, bar: unknown) => SomeOtherType | undefined;
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
type SetReturnType<TFunct extends (...arguments_: any[]) => any, TypeToReturn> = TFunct extends ((this: infer ThisArgument, ...arguments_: infer Arguments) => any) ? IsUnknown<ThisArgument> extends true ? (...arguments_: Arguments) => TypeToReturn : (this: ThisArgument, ...arguments_: Arguments) => TypeToReturn : (...arguments_: Parameters<TFunct>) => TypeToReturn;
|
|
44
|
+
type AsyncFunction = (...arguments_: any[]) => Promise<unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Unwrap the return type of a function that returns a `Promise`.
|
|
47
|
+
*
|
|
48
|
+
* There has been [discussion](https://github.com/microsoft/TypeScript/pull/35998) about implementing this type in TypeScript.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import type {AsyncReturnType} from 'type-fest';
|
|
53
|
+
* import {asyncFunction} from 'api';
|
|
54
|
+
*
|
|
55
|
+
* // This type resolves to the unwrapped return type of `asyncFunction`.
|
|
56
|
+
* type Value = AsyncReturnType<typeof asyncFunction>;
|
|
57
|
+
*
|
|
58
|
+
* async function doSomething(value: Value) {}
|
|
59
|
+
*
|
|
60
|
+
* asyncFunction().then(value => doSomething(value));
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
type AsyncReturnType<Target extends AsyncFunction> = Awaited<ReturnType<Target>>;
|
|
64
|
+
/**
|
|
65
|
+
* Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
|
|
66
|
+
*
|
|
67
|
+
* Use-case: You have two functions, one synchronous and one asynchronous that do the same thing. Instead of having to duplicate the type definition, you can use `Asyncify` to reuse the synchronous type.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```
|
|
71
|
+
* import type {Asyncify} from 'type-fest';
|
|
72
|
+
*
|
|
73
|
+
* // Synchronous function.
|
|
74
|
+
* function getFooSync(someArg: SomeType): Foo {
|
|
75
|
+
* // …
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* type AsyncifiedFooGetter = Asyncify<typeof getFooSync>;
|
|
79
|
+
* //=> type AsyncifiedFooGetter = (someArg: SomeType) => Promise<Foo>;
|
|
80
|
+
*
|
|
81
|
+
* // Same as `getFooSync` but asynchronous.
|
|
82
|
+
* const getFooAsync: AsyncifiedFooGetter = (someArg) => {
|
|
83
|
+
* // TypeScript now knows that `someArg` is `SomeType` automatically.
|
|
84
|
+
* // It also knows that this function must return `Promise<Foo>`.
|
|
85
|
+
* // If you have `@typescript-eslint/promise-function-async` linter rule enabled, it will even report that "Functions that return promises must be async.".
|
|
86
|
+
*
|
|
87
|
+
* // …
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
type Asyncify<TFunct extends FunctionLike> = SetReturnType<TFunct, Promise<Awaited<ReturnType<TFunct>>>>;
|
|
92
|
+
/**
|
|
93
|
+
* Get the result type of a `Promise`
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { Await } from '@stryke/types'
|
|
98
|
+
*
|
|
99
|
+
* const promise = new Promise<string>((res, rej) => res('x'))
|
|
100
|
+
*
|
|
101
|
+
* type test0 = C.Await<typeof promise> // string
|
|
102
|
+
* type test1 = C.Await<Promise<number>> // number
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @param P - A promise
|
|
106
|
+
* @returns [[Any]]
|
|
107
|
+
*/
|
|
108
|
+
type Await<P> = P extends Promise<infer A> ? A : P;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { AsyncFunction, AsyncReturnType, Asyncify, Await, Awaitable, Resolvable, SetReturnType };
|
|
111
|
+
//# sourceMappingURL=async.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.d.cts","names":[],"sources":["../src/async.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;AAaA;;;AAA4D,KAbhD,SAagD,CAAA,CAAA,CAAA,GAbjC,CAaiC,GAb7B,WAa6B,CAbjB,CAaiB,CAAA;;;AAiB5D;;;;;;;;;AAeiC,KAhCrB,UAgCqB,CAAA,CAAA,CAAA,GAhCL,SAgCK,CAhCK,CAgCL,CAAA,GAAA,CAAA,GAAA,GAhCiB,SAgCjB,CAhC2B,CAgC3B,CAAA,CAAA;;;;AAEjC;AAoBA;;;;;;AA+BA;;;;;AAEU,KAtEE,aAsEF,CAAA,eAAA,CAAA,GAAA,UAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,EAAA,YAAA,CAAA,GAjER,MAiEQ,UAAA,CAAA,IAAA,EAAA,KAAA,aAAA,EAAA,GAAA,UAAA,EAAA,KAAA,UAAA,EAAA,GAAA,GAAA,IA3DJ,SA2DI,CA3DM,YA2DN,CAAA,SAAA,IAAA,GAAA,CAAA,GAAA,UAAA,EA1Dc,SA0Dd,EAAA,GA1D4B,YA0D5B,GAAA,CAAA,IAAA,EAzDK,YAyDL,EAAA,GAAA,UAAA,EAzDkC,SAyDlC,EAAA,GAzDgD,YAyDhD,GAAA,CAAA,GAAA,UAAA,EAvDY,UAuDZ,CAvDuB,MAuDvB,CAAA,EAAA,GAvDmC,YAuDnC;AAAR,KArDU,aAAA,GAqDV,CAAA,GAAA,UAAA,EAAA,GAAA,EAAA,EAAA,GArDoD,OAqDpD,CAAA,OAAA,CAAA;;;AAmBF;;;;;;;;;;;;;;;;KApDY,+BAA+B,iBAAiB,QAC1D,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BD,wBAAwB,gBAAgB,cAClD,QACA,QAAQ,QAAQ,WAAW;;;;;;;;;;;;;;;;;KAmBjB,WAAW,UAAU,uBAAuB"}
|
package/dist/async.d.mts
CHANGED
|
@@ -1,2 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FunctionLike, IsUnknown } from "./base.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/async.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Get the type of the value that a promise resolves to.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```
|
|
10
|
+
* import type {Awaited} from 'type-fest';
|
|
11
|
+
*
|
|
12
|
+
* const value: Awaited<Promise<string>> = 'foo';
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
type Awaitable<T> = T | PromiseLike<T>;
|
|
16
|
+
/**
|
|
17
|
+
* A type that can be either a value or a function that returns a value.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```
|
|
21
|
+
* import type {Resolvable} from 'type-fest';
|
|
22
|
+
*
|
|
23
|
+
* const foo: Resolvable<string> = 'bar';
|
|
24
|
+
* const bar: Resolvable<string> = () => 'baz';
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
type Resolvable<T> = Awaitable<T> | (() => Awaitable<T>);
|
|
28
|
+
/**
|
|
29
|
+
* Create a function type with a return type of your choice and the same parameters as the given function type.
|
|
30
|
+
*
|
|
31
|
+
* Use-case: You want to define a wrapped function that returns something different while receiving the same parameters. For example, you might want to wrap a function that can throw an error into one that will return `undefined` instead.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```
|
|
35
|
+
* import type {SetReturnType} from 'type-fest';
|
|
36
|
+
*
|
|
37
|
+
* type MyFunctionThatCanThrow = (foo: SomeType, bar: unknown) => SomeOtherType;
|
|
38
|
+
*
|
|
39
|
+
* type MyWrappedFunction = SetReturnType<MyFunctionThatCanThrow, SomeOtherType | undefined>;
|
|
40
|
+
* //=> type MyWrappedFunction = (foo: SomeType, bar: unknown) => SomeOtherType | undefined;
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
type SetReturnType<TFunct extends (...arguments_: any[]) => any, TypeToReturn> = TFunct extends ((this: infer ThisArgument, ...arguments_: infer Arguments) => any) ? IsUnknown<ThisArgument> extends true ? (...arguments_: Arguments) => TypeToReturn : (this: ThisArgument, ...arguments_: Arguments) => TypeToReturn : (...arguments_: Parameters<TFunct>) => TypeToReturn;
|
|
44
|
+
type AsyncFunction = (...arguments_: any[]) => Promise<unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Unwrap the return type of a function that returns a `Promise`.
|
|
47
|
+
*
|
|
48
|
+
* There has been [discussion](https://github.com/microsoft/TypeScript/pull/35998) about implementing this type in TypeScript.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import type {AsyncReturnType} from 'type-fest';
|
|
53
|
+
* import {asyncFunction} from 'api';
|
|
54
|
+
*
|
|
55
|
+
* // This type resolves to the unwrapped return type of `asyncFunction`.
|
|
56
|
+
* type Value = AsyncReturnType<typeof asyncFunction>;
|
|
57
|
+
*
|
|
58
|
+
* async function doSomething(value: Value) {}
|
|
59
|
+
*
|
|
60
|
+
* asyncFunction().then(value => doSomething(value));
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
type AsyncReturnType<Target extends AsyncFunction> = Awaited<ReturnType<Target>>;
|
|
64
|
+
/**
|
|
65
|
+
* Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
|
|
66
|
+
*
|
|
67
|
+
* Use-case: You have two functions, one synchronous and one asynchronous that do the same thing. Instead of having to duplicate the type definition, you can use `Asyncify` to reuse the synchronous type.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```
|
|
71
|
+
* import type {Asyncify} from 'type-fest';
|
|
72
|
+
*
|
|
73
|
+
* // Synchronous function.
|
|
74
|
+
* function getFooSync(someArg: SomeType): Foo {
|
|
75
|
+
* // …
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* type AsyncifiedFooGetter = Asyncify<typeof getFooSync>;
|
|
79
|
+
* //=> type AsyncifiedFooGetter = (someArg: SomeType) => Promise<Foo>;
|
|
80
|
+
*
|
|
81
|
+
* // Same as `getFooSync` but asynchronous.
|
|
82
|
+
* const getFooAsync: AsyncifiedFooGetter = (someArg) => {
|
|
83
|
+
* // TypeScript now knows that `someArg` is `SomeType` automatically.
|
|
84
|
+
* // It also knows that this function must return `Promise<Foo>`.
|
|
85
|
+
* // If you have `@typescript-eslint/promise-function-async` linter rule enabled, it will even report that "Functions that return promises must be async.".
|
|
86
|
+
*
|
|
87
|
+
* // …
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
type Asyncify<TFunct extends FunctionLike> = SetReturnType<TFunct, Promise<Awaited<ReturnType<TFunct>>>>;
|
|
92
|
+
/**
|
|
93
|
+
* Get the result type of a `Promise`
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { Await } from '@stryke/types'
|
|
98
|
+
*
|
|
99
|
+
* const promise = new Promise<string>((res, rej) => res('x'))
|
|
100
|
+
*
|
|
101
|
+
* type test0 = C.Await<typeof promise> // string
|
|
102
|
+
* type test1 = C.Await<Promise<number>> // number
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @param P - A promise
|
|
106
|
+
* @returns [[Any]]
|
|
107
|
+
*/
|
|
108
|
+
type Await<P> = P extends Promise<infer A> ? A : P;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { AsyncFunction, AsyncReturnType, Asyncify, Await, Awaitable, Resolvable, SetReturnType };
|
|
111
|
+
//# sourceMappingURL=async.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.d.mts","names":[],"sources":["../src/async.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;AAaA;;;AAA4D,KAbhD,SAagD,CAAA,CAAA,CAAA,GAbjC,CAaiC,GAb7B,WAa6B,CAbjB,CAaiB,CAAA;;;AAiB5D;;;;;;;;;AAeiC,KAhCrB,UAgCqB,CAAA,CAAA,CAAA,GAhCL,SAgCK,CAhCK,CAgCL,CAAA,GAAA,CAAA,GAAA,GAhCiB,SAgCjB,CAhC2B,CAgC3B,CAAA,CAAA;;;;AAEjC;AAoBA;;;;;;AA+BA;;;;;AAEU,KAtEE,aAsEF,CAAA,eAAA,CAAA,GAAA,UAAA,EAAA,GAAA,EAAA,EAAA,GAAA,GAAA,EAAA,YAAA,CAAA,GAjER,MAiEQ,UAAA,CAAA,IAAA,EAAA,KAAA,aAAA,EAAA,GAAA,UAAA,EAAA,KAAA,UAAA,EAAA,GAAA,GAAA,IA3DJ,SA2DI,CA3DM,YA2DN,CAAA,SAAA,IAAA,GAAA,CAAA,GAAA,UAAA,EA1Dc,SA0Dd,EAAA,GA1D4B,YA0D5B,GAAA,CAAA,IAAA,EAzDK,YAyDL,EAAA,GAAA,UAAA,EAzDkC,SAyDlC,EAAA,GAzDgD,YAyDhD,GAAA,CAAA,GAAA,UAAA,EAvDY,UAuDZ,CAvDuB,MAuDvB,CAAA,EAAA,GAvDmC,YAuDnC;AAAR,KArDU,aAAA,GAqDV,CAAA,GAAA,UAAA,EAAA,GAAA,EAAA,EAAA,GArDoD,OAqDpD,CAAA,OAAA,CAAA;;;AAmBF;;;;;;;;;;;;;;;;KApDY,+BAA+B,iBAAiB,QAC1D,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BD,wBAAwB,gBAAgB,cAClD,QACA,QAAQ,QAAQ,WAAW;;;;;;;;;;;;;;;;;KAmBjB,WAAW,UAAU,uBAAuB"}
|
package/dist/base.cjs
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
const e
|
|
1
|
+
const e=``,t=`\r
|
|
2
|
+
`,n={},r=`Arguments`,i=`Array`,a=`Object`,o=`Map`,s=`Set`,c=Symbol(`NestedValue`);exports.$NestedValue=c,exports.EMPTY_OBJECT=n,exports.EMPTY_STRING=``,exports.NEWLINE_STRING=`\r
|
|
3
|
+
`,exports.TYPE_ARGUMENTS=`Arguments`,exports.TYPE_ARRAY=`Array`,exports.TYPE_MAP=`Map`,exports.TYPE_OBJECT=`Object`,exports.TYPE_SET=`Set`;
|