@stryke/types 0.10.12 → 0.10.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -10
- package/dist/{array.d.ts → array-DVtfX_TI.d.mts} +17 -13
- package/dist/array-DVtfX_TI.d.mts.map +1 -0
- package/dist/array-DtIKbcDr.d.cts +122 -0
- package/dist/array-DtIKbcDr.d.cts.map +1 -0
- package/dist/array.cjs +0 -1
- package/dist/array.d.cts +2 -0
- package/dist/array.d.mts +2 -0
- package/dist/array.mjs +1 -0
- package/dist/{async.d.ts → async-BtPWg6IL.d.mts} +14 -8
- package/dist/async-BtPWg6IL.d.mts.map +1 -0
- package/dist/async-eKWh-_sF.d.cts +111 -0
- package/dist/async-eKWh-_sF.d.cts.map +1 -0
- package/dist/async.cjs +0 -1
- package/dist/async.d.cts +2 -0
- package/dist/async.d.mts +2 -0
- package/dist/async.mjs +1 -0
- package/dist/{base.d.ts → base-CiIyKS-b.d.mts} +120 -126
- package/dist/base-CiIyKS-b.d.mts.map +1 -0
- package/dist/base-Cpeh4C5c.cjs +3 -0
- package/dist/base-DmFPRVSE.mjs +3 -0
- package/dist/base-DmFPRVSE.mjs.map +1 -0
- package/dist/base-EF17pdAI.d.cts +331 -0
- package/dist/base-EF17pdAI.d.cts.map +1 -0
- package/dist/base.cjs +1 -16
- package/dist/base.d.cts +2 -0
- package/dist/base.d.mts +2 -0
- package/dist/base.mjs +1 -2
- package/dist/configuration-5Q2wg3Id.d.mts +71 -0
- package/dist/configuration-5Q2wg3Id.d.mts.map +1 -0
- package/dist/configuration-Dvz7q6dd.d.cts +71 -0
- package/dist/configuration-Dvz7q6dd.d.cts.map +1 -0
- package/dist/configuration.cjs +0 -1
- package/dist/configuration.d.cts +2 -0
- package/dist/configuration.d.mts +2 -0
- package/dist/configuration.mjs +1 -0
- package/dist/file-dM8RAMNC.d.cts +51 -0
- package/dist/file-dM8RAMNC.d.cts.map +1 -0
- package/dist/file-eWushyiM.d.mts +51 -0
- package/dist/file-eWushyiM.d.mts.map +1 -0
- package/dist/file.cjs +0 -1
- package/dist/file.d.cts +2 -0
- package/dist/file.d.mts +2 -0
- package/dist/file.mjs +1 -0
- package/dist/form-mTzpZCeA.d.cts +40 -0
- package/dist/form-mTzpZCeA.d.cts.map +1 -0
- package/dist/form-sNCVXIEk.d.mts +40 -0
- package/dist/form-sNCVXIEk.d.mts.map +1 -0
- package/dist/form.cjs +0 -1
- package/dist/form.d.cts +2 -0
- package/dist/form.d.mts +2 -0
- package/dist/form.mjs +1 -0
- package/dist/index.cjs +1 -214
- package/dist/index.d.cts +19 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.mjs +1 -1
- package/dist/{json.d.ts → json-BlaU0Pbq.d.cts} +11 -13
- package/dist/json-BlaU0Pbq.d.cts.map +1 -0
- package/dist/json-C3wqh2t3.d.mts +70 -0
- package/dist/json-C3wqh2t3.d.mts.map +1 -0
- package/dist/json.cjs +0 -1
- package/dist/json.d.cts +2 -0
- package/dist/json.d.mts +2 -0
- package/dist/json.mjs +1 -0
- package/dist/logic-BoEG5A3-.d.cts +374 -0
- package/dist/logic-BoEG5A3-.d.cts.map +1 -0
- package/dist/logic-h9Jrrpsk.d.mts +374 -0
- package/dist/logic-h9Jrrpsk.d.mts.map +1 -0
- package/dist/logic.cjs +0 -1
- package/dist/logic.d.cts +2 -0
- package/dist/logic.d.mts +2 -0
- package/dist/logic.mjs +1 -0
- package/dist/messages-Bxu_o13x.d.mts +21 -0
- package/dist/messages-Bxu_o13x.d.mts.map +1 -0
- package/dist/messages-PtLJRJeN.d.cts +21 -0
- package/dist/messages-PtLJRJeN.d.cts.map +1 -0
- package/dist/messages.cjs +0 -1
- package/dist/messages.d.cts +2 -0
- package/dist/messages.d.mts +2 -0
- package/dist/messages.mjs +1 -0
- package/dist/navigator-DLpMW73v.d.mts +42 -0
- package/dist/navigator-DLpMW73v.d.mts.map +1 -0
- package/dist/navigator-wsxMUGqK.d.cts +42 -0
- package/dist/navigator-wsxMUGqK.d.cts.map +1 -0
- package/dist/navigator.cjs +0 -1
- package/dist/navigator.d.cts +2 -0
- package/dist/navigator.d.mts +2 -0
- package/dist/navigator.mjs +1 -0
- package/dist/number.cjs +0 -1
- package/dist/number.d.cts +2 -0
- package/dist/number.d.mts +2 -0
- package/dist/number.mjs +1 -0
- package/dist/{object.d.ts → object-B3Rc0f80.d.mts} +56 -84
- package/dist/object-B3Rc0f80.d.mts.map +1 -0
- package/dist/object-DyLgFijN.d.cts +392 -0
- package/dist/object-DyLgFijN.d.cts.map +1 -0
- package/dist/object.cjs +0 -1
- package/dist/object.d.cts +2 -0
- package/dist/object.d.mts +2 -0
- package/dist/object.mjs +1 -0
- package/dist/package-json-BYMmXu4B.d.mts +261 -0
- package/dist/package-json-BYMmXu4B.d.mts.map +1 -0
- package/dist/package-json-DMeUqEmW.d.cts +261 -0
- package/dist/package-json-DMeUqEmW.d.cts.map +1 -0
- package/dist/package-json.cjs +0 -1
- package/dist/package-json.d.cts +2 -0
- package/dist/package-json.d.mts +2 -0
- package/dist/package-json.mjs +1 -0
- package/dist/package-manager-PRcovqs-.d.mts +6 -0
- package/dist/package-manager-PRcovqs-.d.mts.map +1 -0
- package/dist/package-manager-tcG2TLVT.d.cts +6 -0
- package/dist/package-manager-tcG2TLVT.d.cts.map +1 -0
- package/dist/package-manager.cjs +0 -1
- package/dist/package-manager.d.cts +2 -0
- package/dist/package-manager.d.mts +2 -0
- package/dist/package-manager.mjs +1 -0
- package/dist/string.cjs +0 -1
- package/dist/string.d.cts +2 -0
- package/dist/string.d.mts +2 -0
- package/dist/string.mjs +1 -0
- package/dist/system-BxYi2_rE.d.mts +5 -0
- package/dist/system-BxYi2_rE.d.mts.map +1 -0
- package/dist/system-n1LPjzuJ.d.cts +5 -0
- package/dist/system-n1LPjzuJ.d.cts.map +1 -0
- package/dist/system.cjs +0 -1
- package/dist/system.d.cts +2 -0
- package/dist/system.d.mts +2 -0
- package/dist/system.mjs +1 -0
- package/dist/tsconfig-C6dWY2RO.d.cts +803 -0
- package/dist/tsconfig-C6dWY2RO.d.cts.map +1 -0
- package/dist/tsconfig-CUKA7cEN.d.mts +803 -0
- package/dist/tsconfig-CUKA7cEN.d.mts.map +1 -0
- package/dist/tsconfig.cjs +0 -1
- package/dist/tsconfig.d.cts +2 -0
- package/dist/tsconfig.d.mts +2 -0
- package/dist/tsconfig.mjs +1 -0
- package/dist/user-CkdO4wnf.d.mts +29 -0
- package/dist/user-CkdO4wnf.d.mts.map +1 -0
- package/dist/user-CovHR6Ne.d.cts +29 -0
- package/dist/user-CovHR6Ne.d.cts.map +1 -0
- package/dist/user.cjs +0 -1
- package/dist/user.d.cts +2 -0
- package/dist/user.d.mts +2 -0
- package/dist/user.mjs +1 -0
- package/dist/utilities-BVS-gcgS.d.mts +51 -0
- package/dist/utilities-BVS-gcgS.d.mts.map +1 -0
- package/dist/utilities-Jb4ggdM-.d.cts +51 -0
- package/dist/utilities-Jb4ggdM-.d.cts.map +1 -0
- package/dist/utilities.cjs +0 -1
- package/dist/utilities.d.cts +2 -0
- package/dist/utilities.d.mts +2 -0
- package/dist/utilities.mjs +1 -0
- package/dist/validations-C_7osVpS.d.mts +21 -0
- package/dist/validations-C_7osVpS.d.mts.map +1 -0
- package/dist/validations-CvwxY4RE.d.cts +21 -0
- package/dist/validations-CvwxY4RE.d.cts.map +1 -0
- package/dist/validations.cjs +0 -1
- package/dist/validations.d.cts +2 -0
- package/dist/validations.d.mts +2 -0
- package/dist/validations.mjs +1 -0
- package/package.json +68 -247
- package/dist/configuration.d.ts +0 -67
- package/dist/file.d.ts +0 -46
- package/dist/form.d.ts +0 -35
- package/dist/index.d.ts +0 -27
- package/dist/logic.d.ts +0 -152
- package/dist/messages.d.ts +0 -17
- package/dist/navigator.d.ts +0 -41
- package/dist/number.d.ts +0 -176
- package/dist/package-json.d.ts +0 -260
- package/dist/package-manager.d.ts +0 -2
- package/dist/string.d.ts +0 -75
- package/dist/system.d.ts +0 -1
- package/dist/tsconfig.d.ts +0 -798
- package/dist/user.d.ts +0 -25
- package/dist/utilities.d.ts +0 -53
- package/dist/validations.d.ts +0 -16
package/README.md
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-dark-optimized.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-light-optimized.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x640-dark-optimized.gif" width="100%" alt="Storm Software" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
7
13
|
<br />
|
|
8
14
|
|
|
9
15
|
<div align="center">
|
|
@@ -16,13 +22,13 @@
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
<br />
|
|
19
|
-
This package is part of Storm Software's
|
|
25
|
+
This package is part of Storm Software's **💥 Stryke** monorepo. Stryke packages TypeScript utility packages with shared functionality common to many Storm Software applications.
|
|
20
26
|
|
|
21
27
|
<br />
|
|
22
28
|
|
|
23
29
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
24
30
|
|
|
25
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
26
32
|
|
|
27
33
|
> [!IMPORTANT] Important
|
|
28
34
|
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
|
|
@@ -46,7 +52,6 @@ across many projects.
|
|
|
46
52
|
|
|
47
53
|
<!-- START doctoc -->
|
|
48
54
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
49
|
-
|
|
50
55
|
## Table of Contents
|
|
51
56
|
|
|
52
57
|
- [Installing](#installing)
|
|
@@ -93,10 +98,10 @@ yarn add -D @stryke/types
|
|
|
93
98
|
|
|
94
99
|
## Reduced Package Size
|
|
95
100
|
|
|
96
|
-
This project uses [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
This project uses [tsdown](https://tsdown.dev) to package the source code due to
|
|
102
|
+
its ability to remove unused code and ship smaller javascript files thanks to
|
|
103
|
+
code splitting. This helps to greatly reduce the size of the package and to make
|
|
104
|
+
it easier to use in other projects.
|
|
100
105
|
|
|
101
106
|
## Development
|
|
102
107
|
|
|
@@ -237,10 +242,13 @@ specification. Contributions of any kind welcome!
|
|
|
237
242
|
<br />
|
|
238
243
|
|
|
239
244
|
<hr />
|
|
240
|
-
<br />
|
|
241
245
|
|
|
242
246
|
<div align="center">
|
|
243
|
-
<
|
|
247
|
+
<picture>
|
|
248
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp">
|
|
249
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light-optimized.webp">
|
|
250
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp" width="100%" alt="Storm Software" />
|
|
251
|
+
</picture>
|
|
244
252
|
</div>
|
|
245
253
|
<br />
|
|
246
254
|
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
//#region src/array.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Matches any array or array-like object.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type Arrayable<T> = T | T[];
|
|
6
|
+
type UnknownArray = readonly unknown[];
|
|
6
7
|
/**
|
|
7
8
|
* Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
type TypedArray = BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;
|
|
10
11
|
/**
|
|
11
12
|
* Infer the length of the given array `<T>`.
|
|
12
13
|
*
|
|
13
14
|
* Check out {@link https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f | this article} for more information.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
type ArrayLength<T extends readonly unknown[]> = T extends {
|
|
17
|
+
readonly length: infer L;
|
|
17
18
|
} ? L : never;
|
|
18
19
|
/**
|
|
19
20
|
* Extract the element of an array that also works for array union.
|
|
@@ -22,7 +23,7 @@ export type ArrayLength<T extends readonly unknown[]> = T extends {
|
|
|
22
23
|
*
|
|
23
24
|
* It creates a type-safe way to access the element type of `unknown` type.
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
|
|
26
27
|
/**
|
|
27
28
|
* Provides all values for a constant array or tuple.
|
|
28
29
|
*
|
|
@@ -42,7 +43,7 @@ export type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
|
|
|
42
43
|
*
|
|
43
44
|
* @see {@link ArrayIndices}
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
+
type ArrayValues<T extends readonly unknown[]> = T[number];
|
|
46
47
|
/**
|
|
47
48
|
* Provides valid indices for a constant array or tuple.
|
|
48
49
|
*
|
|
@@ -62,15 +63,15 @@ export type ArrayValues<T extends readonly unknown[]> = T[number];
|
|
|
62
63
|
*
|
|
63
64
|
* @see {@link ArrayValues}
|
|
64
65
|
*/
|
|
65
|
-
|
|
66
|
+
type ArrayIndices<Element extends readonly unknown[]> = Exclude<Partial<Element>["length"], Element["length"]>;
|
|
66
67
|
/**
|
|
67
68
|
* Matches any unknown array or tuple.
|
|
68
69
|
*/
|
|
69
|
-
|
|
70
|
+
type UnknownArrayOrTuple = readonly [...unknown[]];
|
|
70
71
|
/**
|
|
71
72
|
* Extracts the type of the first element of an array or tuple.
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
type FirstArrayElement<TArray extends UnknownArrayOrTuple> = TArray extends readonly [infer THead, ...unknown[]] ? THead : never;
|
|
74
75
|
/**
|
|
75
76
|
* Extracts the type of the last element of an array.
|
|
76
77
|
*
|
|
@@ -93,7 +94,7 @@ export type FirstArrayElement<TArray extends UnknownArrayOrTuple> = TArray exten
|
|
|
93
94
|
* //=> 2
|
|
94
95
|
* ```
|
|
95
96
|
*/
|
|
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;
|
|
97
98
|
/**
|
|
98
99
|
* Returns the static, fixed-length portion of the given array, excluding variable-length parts.
|
|
99
100
|
*
|
|
@@ -104,7 +105,7 @@ export type LastArrayElement<Elements extends readonly unknown[], ElementBeforeT
|
|
|
104
105
|
* //=> [string, number, boolean]
|
|
105
106
|
* ```
|
|
106
107
|
*/
|
|
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;
|
|
108
109
|
/**
|
|
109
110
|
* Returns the variable, non-fixed-length portion of the given array, excluding static-length parts.
|
|
110
111
|
*
|
|
@@ -115,4 +116,7 @@ export type StaticPartOfArray<T extends UnknownArray, Result extends UnknownArra
|
|
|
115
116
|
* //=> string[]
|
|
116
117
|
* ```
|
|
117
118
|
*/
|
|
118
|
-
|
|
119
|
+
type VariablePartOfArray<T extends UnknownArray> = T extends unknown ? T extends readonly [...StaticPartOfArray<T>, ...infer U] ? U : [] : never;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { Arrayable as a, StaticPartOfArray as c, UnknownArrayOrTuple as d, VariablePartOfArray as f, ArrayValues as i, TypedArray as l, ArrayIndices as n, FirstArrayElement as o, ArrayLength as r, LastArrayElement as s, ArrayElement as t, UnknownArray as u };
|
|
122
|
+
//# sourceMappingURL=array-DVtfX_TI.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-DVtfX_TI.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"}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 { Arrayable as a, StaticPartOfArray as c, UnknownArrayOrTuple as d, VariablePartOfArray as f, ArrayValues as i, TypedArray as l, ArrayIndices as n, FirstArrayElement as o, ArrayLength as r, LastArrayElement as s, ArrayElement as t, UnknownArray as u };
|
|
122
|
+
//# sourceMappingURL=array-DtIKbcDr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-DtIKbcDr.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.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/array.d.cts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as Arrayable, c as StaticPartOfArray, d as UnknownArrayOrTuple, f as VariablePartOfArray, i as ArrayValues, l as TypedArray, n as ArrayIndices, o as FirstArrayElement, r as ArrayLength, s as LastArrayElement, t as ArrayElement, u as UnknownArray } from "./array-DtIKbcDr.cjs";
|
|
2
|
+
export { ArrayElement, ArrayIndices, ArrayLength, ArrayValues, Arrayable, FirstArrayElement, LastArrayElement, StaticPartOfArray, TypedArray, UnknownArray, UnknownArrayOrTuple, VariablePartOfArray };
|
package/dist/array.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as Arrayable, c as StaticPartOfArray, d as UnknownArrayOrTuple, f as VariablePartOfArray, i as ArrayValues, l as TypedArray, n as ArrayIndices, o as FirstArrayElement, r as ArrayLength, s as LastArrayElement, t as ArrayElement, u as UnknownArray } from "./array-DVtfX_TI.mjs";
|
|
2
|
+
export { ArrayElement, ArrayIndices, ArrayLength, ArrayValues, Arrayable, FirstArrayElement, LastArrayElement, StaticPartOfArray, TypedArray, UnknownArray, UnknownArrayOrTuple, VariablePartOfArray };
|
package/dist/array.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { K as IsUnknown, j as FunctionLike } from "./base-CiIyKS-b.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/async.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Get the type of the value that a promise resolves to.
|
|
4
7
|
*
|
|
@@ -9,7 +12,7 @@ import type { FunctionLike, IsUnknown } from "./base";
|
|
|
9
12
|
* const value: Awaited<Promise<string>> = 'foo';
|
|
10
13
|
* ```
|
|
11
14
|
*/
|
|
12
|
-
|
|
15
|
+
type Awaitable<T> = T | PromiseLike<T>;
|
|
13
16
|
/**
|
|
14
17
|
* A type that can be either a value or a function that returns a value.
|
|
15
18
|
*
|
|
@@ -21,7 +24,7 @@ export type Awaitable<T> = T | PromiseLike<T>;
|
|
|
21
24
|
* const bar: Resolvable<string> = () => 'baz';
|
|
22
25
|
* ```
|
|
23
26
|
*/
|
|
24
|
-
|
|
27
|
+
type Resolvable<T> = Awaitable<T> | (() => Awaitable<T>);
|
|
25
28
|
/**
|
|
26
29
|
* Create a function type with a return type of your choice and the same parameters as the given function type.
|
|
27
30
|
*
|
|
@@ -37,8 +40,8 @@ export type Resolvable<T> = Awaitable<T> | (() => Awaitable<T>);
|
|
|
37
40
|
* //=> type MyWrappedFunction = (foo: SomeType, bar: unknown) => SomeOtherType | undefined;
|
|
38
41
|
* ```
|
|
39
42
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
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>;
|
|
42
45
|
/**
|
|
43
46
|
* Unwrap the return type of a function that returns a `Promise`.
|
|
44
47
|
*
|
|
@@ -57,7 +60,7 @@ export type AsyncFunction = (...arguments_: any[]) => Promise<unknown>;
|
|
|
57
60
|
* asyncFunction().then(value => doSomething(value));
|
|
58
61
|
* ```
|
|
59
62
|
*/
|
|
60
|
-
|
|
63
|
+
type AsyncReturnType<Target extends AsyncFunction> = Awaited<ReturnType<Target>>;
|
|
61
64
|
/**
|
|
62
65
|
* Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
|
|
63
66
|
*
|
|
@@ -85,7 +88,7 @@ export type AsyncReturnType<Target extends AsyncFunction> = Awaited<ReturnType<T
|
|
|
85
88
|
* }
|
|
86
89
|
* ```
|
|
87
90
|
*/
|
|
88
|
-
|
|
91
|
+
type Asyncify<TFunct extends FunctionLike> = SetReturnType<TFunct, Promise<Awaited<ReturnType<TFunct>>>>;
|
|
89
92
|
/**
|
|
90
93
|
* Get the result type of a `Promise`
|
|
91
94
|
*
|
|
@@ -102,4 +105,7 @@ export type Asyncify<TFunct extends FunctionLike> = SetReturnType<TFunct, Promis
|
|
|
102
105
|
* @param P - A promise
|
|
103
106
|
* @returns [[Any]]
|
|
104
107
|
*/
|
|
105
|
-
|
|
108
|
+
type Await<P> = P extends Promise<infer A> ? A : P;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { Awaitable as a, Await as i, AsyncReturnType as n, Resolvable as o, Asyncify as r, SetReturnType as s, AsyncFunction as t };
|
|
111
|
+
//# sourceMappingURL=async-BtPWg6IL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-BtPWg6IL.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"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { K as IsUnknown, j as FunctionLike } from "./base-EF17pdAI.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 { Awaitable as a, Await as i, AsyncReturnType as n, Resolvable as o, Asyncify as r, SetReturnType as s, AsyncFunction as t };
|
|
111
|
+
//# sourceMappingURL=async-eKWh-_sF.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-eKWh-_sF.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.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/async.d.cts
ADDED
package/dist/async.d.mts
ADDED
package/dist/async.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|