@fluidframework/core-utils 2.0.0-internal.8.0.0 → 2.0.0-rc.1.0.0
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/CHANGELOG.md +4 -0
- package/README.md +0 -6
- package/api-extractor-esm.json +4 -0
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +1 -9
- package/api-report/core-utils.api.md +3 -3
- package/dist/assert.d.ts +1 -1
- package/dist/assert.js +1 -1
- package/dist/assert.js.map +1 -1
- package/dist/compare.d.ts +1 -1
- package/dist/compare.js +1 -1
- package/dist/compare.js.map +1 -1
- package/dist/core-utils-alpha.d.ts +40 -3
- package/dist/core-utils-untrimmed.d.ts +3 -3
- package/dist/lazy.d.ts +1 -1
- package/dist/lazy.js +1 -1
- package/dist/lazy.js.map +1 -1
- package/lib/{assert.d.ts → assert.d.mts} +2 -2
- package/lib/assert.d.mts.map +1 -0
- package/lib/{assert.js → assert.mjs} +3 -7
- package/lib/assert.mjs.map +1 -0
- package/lib/{compare.d.ts → compare.d.mts} +2 -2
- package/lib/compare.d.mts.map +1 -0
- package/lib/{compare.js → compare.mjs} +3 -7
- package/lib/compare.mjs.map +1 -0
- package/lib/{core-utils-alpha.d.ts → core-utils-alpha.d.mts} +40 -3
- package/lib/{core-utils-untrimmed.d.ts → core-utils-untrimmed.d.mts} +3 -3
- package/lib/{delay.d.ts → delay.d.mts} +1 -1
- package/lib/delay.d.mts.map +1 -0
- package/lib/delay.mjs +11 -0
- package/lib/delay.mjs.map +1 -0
- package/lib/{heap.d.ts → heap.d.mts} +1 -1
- package/lib/heap.d.mts.map +1 -0
- package/lib/{heap.js → heap.mjs} +3 -7
- package/lib/{heap.js.map → heap.mjs.map} +1 -1
- package/lib/index.d.mts +14 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.mjs +14 -0
- package/lib/index.mjs.map +1 -0
- package/lib/{lazy.d.ts → lazy.d.mts} +2 -2
- package/lib/lazy.d.mts.map +1 -0
- package/lib/{lazy.js → lazy.mjs} +4 -9
- package/lib/lazy.mjs.map +1 -0
- package/lib/{promiseCache.d.ts → promiseCache.d.mts} +1 -1
- package/lib/promiseCache.d.mts.map +1 -0
- package/lib/{promiseCache.js → promiseCache.mjs} +2 -6
- package/lib/promiseCache.mjs.map +1 -0
- package/lib/{promises.d.ts → promises.d.mts} +1 -1
- package/lib/promises.d.mts.map +1 -0
- package/lib/{promises.js → promises.mjs} +2 -6
- package/lib/promises.mjs.map +1 -0
- package/lib/{timer.d.ts → timer.d.mts} +1 -1
- package/lib/timer.d.mts.map +1 -0
- package/lib/{timer.js → timer.mjs} +9 -15
- package/lib/timer.mjs.map +1 -0
- package/lib/{unreachable.d.ts → unreachable.d.mts} +1 -1
- package/lib/unreachable.d.mts.map +1 -0
- package/lib/{unreachable.js → unreachable.mjs} +2 -6
- package/lib/unreachable.mjs.map +1 -0
- package/package.json +26 -13
- package/src/assert.ts +1 -1
- package/src/compare.ts +1 -1
- package/src/lazy.ts +1 -1
- package/lib/assert.d.ts.map +0 -1
- package/lib/assert.js.map +0 -1
- package/lib/compare.d.ts.map +0 -1
- package/lib/compare.js.map +0 -1
- package/lib/delay.d.ts.map +0 -1
- package/lib/delay.js +0 -15
- package/lib/delay.js.map +0 -1
- package/lib/heap.d.ts.map +0 -1
- package/lib/index.d.ts +0 -14
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -30
- package/lib/index.js.map +0 -1
- package/lib/lazy.d.ts.map +0 -1
- package/lib/lazy.js.map +0 -1
- package/lib/promiseCache.d.ts.map +0 -1
- package/lib/promiseCache.js.map +0 -1
- package/lib/promises.d.ts.map +0 -1
- package/lib/promises.js.map +0 -1
- package/lib/timer.d.ts.map +0 -1
- package/lib/timer.js.map +0 -1
- package/lib/unreachable.d.ts.map +0 -1
- package/lib/unreachable.js.map +0 -1
- package/tsconfig.esnext.json +0 -6
- /package/lib/{core-utils-beta.d.ts → core-utils-beta.d.mts} +0 -0
- /package/lib/{core-utils-public.d.ts → core-utils-public.d.mts} +0 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -47,12 +47,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
47
47
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
48
48
|
library consumers should always prefer `^`.
|
|
49
49
|
|
|
50
|
-
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
51
|
-
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
52
|
-
Standard `^` and `~` ranges will not work as expected.
|
|
53
|
-
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
54
|
-
package for more information including tools to convert between version schemes.
|
|
55
|
-
|
|
56
50
|
<!-- prettier-ignore-end -->
|
|
57
51
|
|
|
58
52
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
package/api-extractor-lint.json
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-lint.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: remove once base config has this enabled as an error
|
|
7
|
-
"ae-incompatible-release-tags": {
|
|
8
|
-
"logLevel": "error",
|
|
9
|
-
"addToApiReportFile": false
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json"
|
|
13
4
|
}
|
package/api-extractor.json
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
4
|
-
"messages": {
|
|
5
|
-
"extractorMessageReporting": {
|
|
6
|
-
// TODO: Add missing documentation and remove this rule override
|
|
7
|
-
"ae-undocumented": {
|
|
8
|
-
"logLevel": "none"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json"
|
|
12
4
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
// @
|
|
7
|
+
// @alpha
|
|
8
8
|
export function assert(condition: boolean, message: string | number): asserts condition;
|
|
9
9
|
|
|
10
|
-
// @
|
|
10
|
+
// @alpha
|
|
11
11
|
export const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean;
|
|
12
12
|
|
|
13
13
|
// @alpha
|
|
@@ -74,7 +74,7 @@ export class Lazy<T> {
|
|
|
74
74
|
get value(): T;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// @
|
|
77
|
+
// @alpha
|
|
78
78
|
export class LazyPromise<T> implements Promise<T> {
|
|
79
79
|
// (undocumented)
|
|
80
80
|
get [Symbol.toStringTag](): string;
|
package/dist/assert.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* A number should not be specified manually: use a string.
|
|
12
12
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
13
13
|
* use numbered error codes instead.
|
|
14
|
-
* @
|
|
14
|
+
* @alpha
|
|
15
15
|
*/
|
|
16
16
|
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
17
17
|
//# sourceMappingURL=assert.d.ts.map
|
package/dist/assert.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.assert = void 0;
|
|
|
14
14
|
* A number should not be specified manually: use a string.
|
|
15
15
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
16
16
|
* use numbered error codes instead.
|
|
17
|
-
* @
|
|
17
|
+
* @alpha
|
|
18
18
|
*/
|
|
19
19
|
function assert(condition, message) {
|
|
20
20
|
if (!condition) {
|
package/dist/assert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;GAUG;AACH,SAAgB,MAAM,CAAC,SAAkB,EAAE,OAAwB;IAClE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,KAAK,CACd,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CACpF,CAAC;KACF;AACF,CAAC;AAND,wBAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A browser friendly assert library.\n * Use this instead of the 'assert' package, which has a big impact on bundle sizes.\n * @param condition - The condition that should be true, if the condition is false an error will be thrown.\n * Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.\n * @param message - The message to include in the error when the condition does not hold.\n * A number should not be specified manually: use a string.\n * Before a release, policy-check should be run, which will convert any asserts still using strings to\n * use numbered error codes instead.\n * @
|
|
1
|
+
{"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;GAUG;AACH,SAAgB,MAAM,CAAC,SAAkB,EAAE,OAAwB;IAClE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,KAAK,CACd,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CACpF,CAAC;KACF;AACF,CAAC;AAND,wBAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A browser friendly assert library.\n * Use this instead of the 'assert' package, which has a big impact on bundle sizes.\n * @param condition - The condition that should be true, if the condition is false an error will be thrown.\n * Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.\n * @param message - The message to include in the error when the condition does not hold.\n * A number should not be specified manually: use a string.\n * Before a release, policy-check should be run, which will convert any asserts still using strings to\n * use numbered error codes instead.\n * @alpha\n */\nexport function assert(condition: boolean, message: string | number): asserts condition {\n\tif (!condition) {\n\t\tthrow new Error(\n\t\t\ttypeof message === \"number\" ? `0x${message.toString(16).padStart(3, \"0\")}` : message,\n\t\t);\n\t}\n}\n"]}
|
package/dist/compare.d.ts
CHANGED
package/dist/compare.js
CHANGED
package/dist/compare.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../src/compare.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;GASG;AACI,MAAM,aAAa,GAAG,CAC5B,IAAkB,EAClB,KAAmB,EACnB,aAAoE,CACnE,QAAW,EACX,SAAY,EACF,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAClC,EAAE;IACZ,6CAA6C;IAC7C,sCAAsC;IACtC,wDAAwD;IACxD,sEAAsE;IACtE,OAAO,CACN,IAAI,KAAK,KAAK,IAAI,+DAA+D;QACjF,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,8DAA8D;YAC9F,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAC5E,CAAC;AACH,CAAC,CAAC;AAjBW,QAAA,aAAa,iBAiBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Compare two arrays. Returns true if their elements are equivalent and in the same order.\n *\n * @
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../src/compare.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;GASG;AACI,MAAM,aAAa,GAAG,CAC5B,IAAkB,EAClB,KAAmB,EACnB,aAAoE,CACnE,QAAW,EACX,SAAY,EACF,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAClC,EAAE;IACZ,6CAA6C;IAC7C,sCAAsC;IACtC,wDAAwD;IACxD,sEAAsE;IACtE,OAAO,CACN,IAAI,KAAK,KAAK,IAAI,+DAA+D;QACjF,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,8DAA8D;YAC9F,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAC5E,CAAC;AACH,CAAC,CAAC;AAjBW,QAAA,aAAa,iBAiBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Compare two arrays. Returns true if their elements are equivalent and in the same order.\n *\n * @alpha\n *\n * @param left - The first array to compare\n * @param right - The second array to compare\n * @param comparator - The function used to check if two `T`s are equivalent.\n * Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)\n */\nexport const compareArrays = <T>(\n\tleft: readonly T[],\n\tright: readonly T[],\n\tcomparator: (leftItem: T, rightItem: T, index: number) => boolean = (\n\t\tleftItem: T,\n\t\trightItem: T,\n\t): boolean => Object.is(leftItem, rightItem),\n): boolean => {\n\t// PERF: 'for-loop' and 'Array.every()' tied.\n\t// '===' and 'Object.is()' tied.\n\t// Trivial acceptance adds no measurable overhead.\n\t// 30% penalty vs. baseline for exported function [node 14 x64].\n\treturn (\n\t\tleft === right || // Trivial acceptance: 'left' and 'right' are the same instance\n\t\t(left.length === right.length && // Trivial rejection: 'left' and 'right' are different lengths\n\t\t\tleft.every((leftItem, index) => comparator(leftItem, right[index], index)))\n\t);\n};\n"]}
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A browser friendly assert library.
|
|
3
|
+
* Use this instead of the 'assert' package, which has a big impact on bundle sizes.
|
|
4
|
+
* @param condition - The condition that should be true, if the condition is false an error will be thrown.
|
|
5
|
+
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.
|
|
6
|
+
* @param message - The message to include in the error when the condition does not hold.
|
|
7
|
+
* A number should not be specified manually: use a string.
|
|
8
|
+
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
9
|
+
* use numbered error codes instead.
|
|
10
|
+
* @alpha
|
|
11
|
+
*/
|
|
12
|
+
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
2
13
|
|
|
3
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
16
|
+
*
|
|
17
|
+
* @alpha
|
|
18
|
+
*
|
|
19
|
+
* @param left - The first array to compare
|
|
20
|
+
* @param right - The second array to compare
|
|
21
|
+
* @param comparator - The function used to check if two `T`s are equivalent.
|
|
22
|
+
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)
|
|
23
|
+
*/
|
|
24
|
+
export declare const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean;
|
|
4
25
|
|
|
5
26
|
/**
|
|
6
27
|
* A deferred creates a promise and the ability to resolve or reject it
|
|
@@ -52,7 +73,23 @@ export declare class Deferred<T> {
|
|
|
52
73
|
|
|
53
74
|
/* Excluded from this release type: Lazy */
|
|
54
75
|
|
|
55
|
-
|
|
76
|
+
/**
|
|
77
|
+
* A lazy evaluated promise. The execute function is delayed until
|
|
78
|
+
* the promise is used, e.g. await, then, catch ...
|
|
79
|
+
* The execute function is only called once.
|
|
80
|
+
* All calls are then proxied to the promise returned by the execute method.
|
|
81
|
+
* @alpha
|
|
82
|
+
*/
|
|
83
|
+
export declare class LazyPromise<T> implements Promise<T> {
|
|
84
|
+
private readonly execute;
|
|
85
|
+
get [Symbol.toStringTag](): string;
|
|
86
|
+
private result;
|
|
87
|
+
constructor(execute: () => Promise<T>);
|
|
88
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
89
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
|
|
90
|
+
finally(onfinally?: (() => void) | null | undefined): Promise<T>;
|
|
91
|
+
private getPromise;
|
|
92
|
+
}
|
|
56
93
|
|
|
57
94
|
/* Excluded from this release type: NumberComparer */
|
|
58
95
|
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* A number should not be specified manually: use a string.
|
|
8
8
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
9
9
|
* use numbered error codes instead.
|
|
10
|
-
* @
|
|
10
|
+
* @alpha
|
|
11
11
|
*/
|
|
12
12
|
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @alpha
|
|
18
18
|
*
|
|
19
19
|
* @param left - The first array to compare
|
|
20
20
|
* @param right - The second array to compare
|
|
@@ -209,7 +209,7 @@ export declare class Lazy<T> {
|
|
|
209
209
|
* the promise is used, e.g. await, then, catch ...
|
|
210
210
|
* The execute function is only called once.
|
|
211
211
|
* All calls are then proxied to the promise returned by the execute method.
|
|
212
|
-
* @
|
|
212
|
+
* @alpha
|
|
213
213
|
*/
|
|
214
214
|
export declare class LazyPromise<T> implements Promise<T> {
|
|
215
215
|
private readonly execute;
|
package/dist/lazy.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class Lazy<T> {
|
|
|
29
29
|
* the promise is used, e.g. await, then, catch ...
|
|
30
30
|
* The execute function is only called once.
|
|
31
31
|
* All calls are then proxied to the promise returned by the execute method.
|
|
32
|
-
* @
|
|
32
|
+
* @alpha
|
|
33
33
|
*/
|
|
34
34
|
export declare class LazyPromise<T> implements Promise<T> {
|
|
35
35
|
private readonly execute;
|
package/dist/lazy.js
CHANGED
|
@@ -42,7 +42,7 @@ exports.Lazy = Lazy;
|
|
|
42
42
|
* the promise is used, e.g. await, then, catch ...
|
|
43
43
|
* The execute function is only called once.
|
|
44
44
|
* All calls are then proxied to the promise returned by the execute method.
|
|
45
|
-
* @
|
|
45
|
+
* @alpha
|
|
46
46
|
*/
|
|
47
47
|
class LazyPromise {
|
|
48
48
|
get [Symbol.toStringTag]() {
|
package/dist/lazy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.js","sourceRoot":"","sources":["../src/lazy.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AACH,MAAa,IAAI;IAGhB;;;OAGG;IACH,YAAoC,cAAuB;QAAvB,mBAAc,GAAd,cAAc,CAAS;QALnD,eAAU,GAAY,KAAK,CAAC;IAK0B,CAAC;IAE/D;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;SACpC;QACD,oEAAoE;QACpE,OAAO,IAAI,CAAC,MAAO,CAAC;IACrB,CAAC;CACD;AA3BD,oBA2BC;AAED;;;;;;GAMG;AACH,MAAa,WAAW;IACvB,IAAW,CAAC,MAAM,CAAC,WAAW,CAAC;QAC9B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAID,YAAoC,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;IAAG,CAAC;IAEjE,+CAA+C;IACxC,KAAK,CAAC,IAAI;IAChB,kDAAkD;IAClD,WAAiF;IACjF,6CAA6C;IAC7C,sFAAsF;IACtF,UAAmF;QAEnF,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAqB,GAAG,SAAS,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,KAAK;IACjB,6CAA6C;IAC7C,sFAAsF;IACtF,UAAiF;QAEjF,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,CAAU,GAAG,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,OAAO,CAAC,SAA2C;QAC/D,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IAChD,CAAC;IAEO,KAAK,CAAC,UAAU;QACvB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;CACD;AA1CD,kCA0CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable.\n * @internal\n */\nexport class Lazy<T> {\n\tprivate _value: T | undefined;\n\tprivate _evaluated: boolean = false;\n\t/**\n\t * Instantiates an instance of Lazy<T>.\n\t * @param valueGenerator - The function that will generate the value when value is accessed the first time.\n\t */\n\tpublic constructor(private readonly valueGenerator: () => T) {}\n\n\t/**\n\t * Return true if the value as been generated, otherwise false.\n\t */\n\tpublic get evaluated(): boolean {\n\t\treturn this._evaluated;\n\t}\n\n\t/**\n\t * Get the value. If this is the first call the value will be generated.\n\t */\n\tpublic get value(): T {\n\t\tif (!this._evaluated) {\n\t\t\tthis._evaluated = true;\n\t\t\tthis._value = this.valueGenerator();\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\treturn this._value!;\n\t}\n}\n\n/**\n * A lazy evaluated promise. The execute function is delayed until\n * the promise is used, e.g. await, then, catch ...\n * The execute function is only called once.\n * All calls are then proxied to the promise returned by the execute method.\n * @
|
|
1
|
+
{"version":3,"file":"lazy.js","sourceRoot":"","sources":["../src/lazy.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AACH,MAAa,IAAI;IAGhB;;;OAGG;IACH,YAAoC,cAAuB;QAAvB,mBAAc,GAAd,cAAc,CAAS;QALnD,eAAU,GAAY,KAAK,CAAC;IAK0B,CAAC;IAE/D;;OAEG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACrB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;SACpC;QACD,oEAAoE;QACpE,OAAO,IAAI,CAAC,MAAO,CAAC;IACrB,CAAC;CACD;AA3BD,oBA2BC;AAED;;;;;;GAMG;AACH,MAAa,WAAW;IACvB,IAAW,CAAC,MAAM,CAAC,WAAW,CAAC;QAC9B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAID,YAAoC,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;IAAG,CAAC;IAEjE,+CAA+C;IACxC,KAAK,CAAC,IAAI;IAChB,kDAAkD;IAClD,WAAiF;IACjF,6CAA6C;IAC7C,sFAAsF;IACtF,UAAmF;QAEnF,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAqB,GAAG,SAAS,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,KAAK;IACjB,6CAA6C;IAC7C,sFAAsF;IACtF,UAAiF;QAEjF,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,CAAU,GAAG,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,OAAO,CAAC,SAA2C;QAC/D,8CAA8C;QAC9C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IAChD,CAAC;IAEO,KAAK,CAAC,UAAU;QACvB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;CACD;AA1CD,kCA0CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable.\n * @internal\n */\nexport class Lazy<T> {\n\tprivate _value: T | undefined;\n\tprivate _evaluated: boolean = false;\n\t/**\n\t * Instantiates an instance of Lazy<T>.\n\t * @param valueGenerator - The function that will generate the value when value is accessed the first time.\n\t */\n\tpublic constructor(private readonly valueGenerator: () => T) {}\n\n\t/**\n\t * Return true if the value as been generated, otherwise false.\n\t */\n\tpublic get evaluated(): boolean {\n\t\treturn this._evaluated;\n\t}\n\n\t/**\n\t * Get the value. If this is the first call the value will be generated.\n\t */\n\tpublic get value(): T {\n\t\tif (!this._evaluated) {\n\t\t\tthis._evaluated = true;\n\t\t\tthis._value = this.valueGenerator();\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\treturn this._value!;\n\t}\n}\n\n/**\n * A lazy evaluated promise. The execute function is delayed until\n * the promise is used, e.g. await, then, catch ...\n * The execute function is only called once.\n * All calls are then proxied to the promise returned by the execute method.\n * @alpha\n */\nexport class LazyPromise<T> implements Promise<T> {\n\tpublic get [Symbol.toStringTag](): string {\n\t\treturn this.getPromise()[Symbol.toStringTag];\n\t}\n\n\tprivate result: Promise<T> | undefined;\n\n\tpublic constructor(private readonly execute: () => Promise<T>) {}\n\n\t// eslint-disable-next-line unicorn/no-thenable\n\tpublic async then<TResult1 = T, TResult2 = never>(\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tonfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined,\n\t\t// TODO: Use `unknown` instead (API breaking)\n\t\t// eslint-disable-next-line @rushstack/no-new-null, @typescript-eslint/no-explicit-any\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined,\n\t): Promise<TResult1 | TResult2> {\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.getPromise().then<TResult1, TResult2>(...arguments);\n\t}\n\n\tpublic async catch<TResult = never>(\n\t\t// TODO: Use `unknown` instead (API breaking)\n\t\t// eslint-disable-next-line @rushstack/no-new-null, @typescript-eslint/no-explicit-any\n\t\tonrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined,\n\t): Promise<T | TResult> {\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.getPromise().catch<TResult>(...arguments);\n\t}\n\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tpublic async finally(onfinally?: (() => void) | null | undefined): Promise<T> {\n\t\t// eslint-disable-next-line prefer-rest-params\n\t\treturn this.getPromise().finally(...arguments);\n\t}\n\n\tprivate async getPromise(): Promise<T> {\n\t\tif (this.result === undefined) {\n\t\t\tthis.result = this.execute();\n\t\t}\n\t\treturn this.result;\n\t}\n}\n"]}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* A number should not be specified manually: use a string.
|
|
12
12
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
13
13
|
* use numbered error codes instead.
|
|
14
|
-
* @
|
|
14
|
+
* @alpha
|
|
15
15
|
*/
|
|
16
16
|
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
17
|
-
//# sourceMappingURL=assert.d.
|
|
17
|
+
//# sourceMappingURL=assert.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.mts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,SAAS,CAMtF"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*!
|
|
3
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
3
|
* Licensed under the MIT License.
|
|
5
4
|
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.assert = void 0;
|
|
8
5
|
/**
|
|
9
6
|
* A browser friendly assert library.
|
|
10
7
|
* Use this instead of the 'assert' package, which has a big impact on bundle sizes.
|
|
@@ -14,12 +11,11 @@ exports.assert = void 0;
|
|
|
14
11
|
* A number should not be specified manually: use a string.
|
|
15
12
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
16
13
|
* use numbered error codes instead.
|
|
17
|
-
* @
|
|
14
|
+
* @alpha
|
|
18
15
|
*/
|
|
19
|
-
function assert(condition, message) {
|
|
16
|
+
export function assert(condition, message) {
|
|
20
17
|
if (!condition) {
|
|
21
18
|
throw new Error(typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=assert.js.map
|
|
21
|
+
//# sourceMappingURL=assert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.mjs","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,SAAkB,EAAE,OAAwB;IAClE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,KAAK,CACd,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CACpF,CAAC;KACF;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A browser friendly assert library.\n * Use this instead of the 'assert' package, which has a big impact on bundle sizes.\n * @param condition - The condition that should be true, if the condition is false an error will be thrown.\n * Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.\n * @param message - The message to include in the error when the condition does not hold.\n * A number should not be specified manually: use a string.\n * Before a release, policy-check should be run, which will convert any asserts still using strings to\n * use numbered error codes instead.\n * @alpha\n */\nexport function assert(condition: boolean, message: string | number): asserts condition {\n\tif (!condition) {\n\t\tthrow new Error(\n\t\t\ttypeof message === \"number\" ? `0x${message.toString(16).padStart(3, \"0\")}` : message,\n\t\t);\n\t}\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
7
7
|
*
|
|
8
|
-
* @
|
|
8
|
+
* @alpha
|
|
9
9
|
*
|
|
10
10
|
* @param left - The first array to compare
|
|
11
11
|
* @param right - The second array to compare
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)
|
|
14
14
|
*/
|
|
15
15
|
export declare const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean;
|
|
16
|
-
//# sourceMappingURL=compare.d.
|
|
16
|
+
//# sourceMappingURL=compare.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.mts","sourceRoot":"","sources":["../src/compare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,+FAGsB,MAAM,KAAK,OAAO,KAI/D,OAUF,CAAC"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*!
|
|
3
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
3
|
* Licensed under the MIT License.
|
|
5
4
|
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.compareArrays = void 0;
|
|
8
5
|
/**
|
|
9
6
|
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
10
7
|
*
|
|
11
|
-
* @
|
|
8
|
+
* @alpha
|
|
12
9
|
*
|
|
13
10
|
* @param left - The first array to compare
|
|
14
11
|
* @param right - The second array to compare
|
|
15
12
|
* @param comparator - The function used to check if two `T`s are equivalent.
|
|
16
13
|
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)
|
|
17
14
|
*/
|
|
18
|
-
const compareArrays = (left, right, comparator = (leftItem, rightItem) => Object.is(leftItem, rightItem)) => {
|
|
15
|
+
export const compareArrays = (left, right, comparator = (leftItem, rightItem) => Object.is(leftItem, rightItem)) => {
|
|
19
16
|
// PERF: 'for-loop' and 'Array.every()' tied.
|
|
20
17
|
// '===' and 'Object.is()' tied.
|
|
21
18
|
// Trivial acceptance adds no measurable overhead.
|
|
@@ -24,5 +21,4 @@ const compareArrays = (left, right, comparator = (leftItem, rightItem) => Object
|
|
|
24
21
|
(left.length === right.length && // Trivial rejection: 'left' and 'right' are different lengths
|
|
25
22
|
left.every((leftItem, index) => comparator(leftItem, right[index], index))));
|
|
26
23
|
};
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=compare.js.map
|
|
24
|
+
//# sourceMappingURL=compare.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.mjs","sourceRoot":"","sources":["../src/compare.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,IAAkB,EAClB,KAAmB,EACnB,aAAoE,CACnE,QAAW,EACX,SAAY,EACF,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAClC,EAAE;IACZ,6CAA6C;IAC7C,sCAAsC;IACtC,wDAAwD;IACxD,sEAAsE;IACtE,OAAO,CACN,IAAI,KAAK,KAAK,IAAI,+DAA+D;QACjF,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,8DAA8D;YAC9F,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAC5E,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Compare two arrays. Returns true if their elements are equivalent and in the same order.\n *\n * @alpha\n *\n * @param left - The first array to compare\n * @param right - The second array to compare\n * @param comparator - The function used to check if two `T`s are equivalent.\n * Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)\n */\nexport const compareArrays = <T>(\n\tleft: readonly T[],\n\tright: readonly T[],\n\tcomparator: (leftItem: T, rightItem: T, index: number) => boolean = (\n\t\tleftItem: T,\n\t\trightItem: T,\n\t): boolean => Object.is(leftItem, rightItem),\n): boolean => {\n\t// PERF: 'for-loop' and 'Array.every()' tied.\n\t// '===' and 'Object.is()' tied.\n\t// Trivial acceptance adds no measurable overhead.\n\t// 30% penalty vs. baseline for exported function [node 14 x64].\n\treturn (\n\t\tleft === right || // Trivial acceptance: 'left' and 'right' are the same instance\n\t\t(left.length === right.length && // Trivial rejection: 'left' and 'right' are different lengths\n\t\t\tleft.every((leftItem, index) => comparator(leftItem, right[index], index)))\n\t);\n};\n"]}
|
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A browser friendly assert library.
|
|
3
|
+
* Use this instead of the 'assert' package, which has a big impact on bundle sizes.
|
|
4
|
+
* @param condition - The condition that should be true, if the condition is false an error will be thrown.
|
|
5
|
+
* Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.
|
|
6
|
+
* @param message - The message to include in the error when the condition does not hold.
|
|
7
|
+
* A number should not be specified manually: use a string.
|
|
8
|
+
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
9
|
+
* use numbered error codes instead.
|
|
10
|
+
* @alpha
|
|
11
|
+
*/
|
|
12
|
+
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
2
13
|
|
|
3
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
16
|
+
*
|
|
17
|
+
* @alpha
|
|
18
|
+
*
|
|
19
|
+
* @param left - The first array to compare
|
|
20
|
+
* @param right - The second array to compare
|
|
21
|
+
* @param comparator - The function used to check if two `T`s are equivalent.
|
|
22
|
+
* Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)
|
|
23
|
+
*/
|
|
24
|
+
export declare const compareArrays: <T>(left: readonly T[], right: readonly T[], comparator?: (leftItem: T, rightItem: T, index: number) => boolean) => boolean;
|
|
4
25
|
|
|
5
26
|
/**
|
|
6
27
|
* A deferred creates a promise and the ability to resolve or reject it
|
|
@@ -52,7 +73,23 @@ export declare class Deferred<T> {
|
|
|
52
73
|
|
|
53
74
|
/* Excluded from this release type: Lazy */
|
|
54
75
|
|
|
55
|
-
|
|
76
|
+
/**
|
|
77
|
+
* A lazy evaluated promise. The execute function is delayed until
|
|
78
|
+
* the promise is used, e.g. await, then, catch ...
|
|
79
|
+
* The execute function is only called once.
|
|
80
|
+
* All calls are then proxied to the promise returned by the execute method.
|
|
81
|
+
* @alpha
|
|
82
|
+
*/
|
|
83
|
+
export declare class LazyPromise<T> implements Promise<T> {
|
|
84
|
+
private readonly execute;
|
|
85
|
+
get [Symbol.toStringTag](): string;
|
|
86
|
+
private result;
|
|
87
|
+
constructor(execute: () => Promise<T>);
|
|
88
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
89
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
|
|
90
|
+
finally(onfinally?: (() => void) | null | undefined): Promise<T>;
|
|
91
|
+
private getPromise;
|
|
92
|
+
}
|
|
56
93
|
|
|
57
94
|
/* Excluded from this release type: NumberComparer */
|
|
58
95
|
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* A number should not be specified manually: use a string.
|
|
8
8
|
* Before a release, policy-check should be run, which will convert any asserts still using strings to
|
|
9
9
|
* use numbered error codes instead.
|
|
10
|
-
* @
|
|
10
|
+
* @alpha
|
|
11
11
|
*/
|
|
12
12
|
export declare function assert(condition: boolean, message: string | number): asserts condition;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Compare two arrays. Returns true if their elements are equivalent and in the same order.
|
|
16
16
|
*
|
|
17
|
-
* @
|
|
17
|
+
* @alpha
|
|
18
18
|
*
|
|
19
19
|
* @param left - The first array to compare
|
|
20
20
|
* @param right - The second array to compare
|
|
@@ -209,7 +209,7 @@ export declare class Lazy<T> {
|
|
|
209
209
|
* the promise is used, e.g. await, then, catch ...
|
|
210
210
|
* The execute function is only called once.
|
|
211
211
|
* All calls are then proxied to the promise returned by the execute method.
|
|
212
|
-
* @
|
|
212
|
+
* @alpha
|
|
213
213
|
*/
|
|
214
214
|
export declare class LazyPromise<T> implements Promise<T> {
|
|
215
215
|
private readonly execute;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay.d.mts","sourceRoot":"","sources":["../src/delay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,KAAK,WAAkB,MAAM,KAAG,QAAQ,IAAI,CACK,CAAC"}
|
package/lib/delay.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Returns a promise that resolves after `timeMs`.
|
|
7
|
+
* @param timeMs - Time in milliseconds to wait.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export const delay = async (timeMs) => new Promise((resolve) => setTimeout(() => resolve(), timeMs));
|
|
11
|
+
//# sourceMappingURL=delay.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay.mjs","sourceRoot":"","sources":["../src/delay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE,MAAc,EAAiB,EAAE,CAC5D,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Returns a promise that resolves after `timeMs`.\n * @param timeMs - Time in milliseconds to wait.\n * @internal\n */\nexport const delay = async (timeMs: number): Promise<void> =>\n\tnew Promise((resolve) => setTimeout(() => resolve(), timeMs));\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heap.d.mts","sourceRoot":"","sources":["../src/heap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC3B;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IAEP;;;;OAIG;IACH,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,MAAM,CAW5C,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,IAAI,CAAC,CAAC;IAOC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IANrC,OAAO,CAAC,CAAC,CAAiB;IAE1B;;;OAGG;gBACgB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAIrC;;;;OAIG;IACI,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS;IAIvC;;;;OAIG;IACI,GAAG,IAAI,CAAC,GAAG,SAAS;IAY3B;;;;;OAKG;IACI,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAQ9B;;OAEG;IACI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;IASvC;;;;OAIG;IACI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;IAYvC;;;;OAIG;IACI,KAAK,IAAI,MAAM;IAItB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,OAAO;IAiBf,OAAO,CAAC,IAAI;CAOZ"}
|
package/lib/{heap.js → heap.mjs}
RENAMED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*!
|
|
3
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
3
|
* Licensed under the MIT License.
|
|
5
4
|
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.Heap = exports.NumberComparer = void 0;
|
|
8
5
|
/**
|
|
9
6
|
* A comparer for numbers.
|
|
10
7
|
* @internal
|
|
11
8
|
*/
|
|
12
|
-
|
|
9
|
+
export const NumberComparer = {
|
|
13
10
|
/**
|
|
14
11
|
* The compare function for numbers.
|
|
15
12
|
* @returns The difference of the two numbers.
|
|
@@ -24,7 +21,7 @@ exports.NumberComparer = {
|
|
|
24
21
|
* Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.
|
|
25
22
|
* @internal
|
|
26
23
|
*/
|
|
27
|
-
class Heap {
|
|
24
|
+
export class Heap {
|
|
28
25
|
/**
|
|
29
26
|
* Creates an instance of `Heap` with comparer.
|
|
30
27
|
* @param comp - A comparer that specify how elements are ordered.
|
|
@@ -140,5 +137,4 @@ class Heap {
|
|
|
140
137
|
this.L[j].position = j;
|
|
141
138
|
}
|
|
142
139
|
}
|
|
143
|
-
|
|
144
|
-
//# sourceMappingURL=heap.js.map
|
|
140
|
+
//# sourceMappingURL=heap.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heap.
|
|
1
|
+
{"version":3,"file":"heap.mjs","sourceRoot":"","sources":["../src/heap.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Interface for a comparer.\n * @internal\n */\nexport interface IComparer<T> {\n\t/**\n\t * The minimum value of type T.\n\t */\n\tmin: T;\n\n\t/**\n\t * Compare the two value\n\t *\n\t * @returns 0 if the value is equal, negative number if a is smaller then b, positive number otherwise\n\t */\n\tcompare(a: T, b: T): number;\n}\n\n/**\n * A comparer for numbers.\n * @internal\n */\nexport const NumberComparer: IComparer<number> = {\n\t/**\n\t * The compare function for numbers.\n\t * @returns The difference of the two numbers.\n\t */\n\tcompare: (a, b): number => a - b,\n\n\t/**\n\t * The minimum value of a JavaScript number, which is `Number.MIN_VALUE`.\n\t */\n\tmin: Number.MIN_VALUE,\n};\n\n/**\n * Interface to a node in {@link Heap}.\n * @internal\n */\nexport interface IHeapNode<T> {\n\tvalue: T;\n\tposition: number;\n}\n\n/**\n * Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.\n * @internal\n */\nexport class Heap<T> {\n\tprivate L: IHeapNode<T>[];\n\n\t/**\n\t * Creates an instance of `Heap` with comparer.\n\t * @param comp - A comparer that specify how elements are ordered.\n\t */\n\tconstructor(public comp: IComparer<T>) {\n\t\tthis.L = [{ value: comp.min, position: 0 }];\n\t}\n\n\t/**\n\t * Return the smallest element in the heap as determined by the order of the comparer\n\t *\n\t * @returns Heap node containing the smallest element\n\t */\n\tpublic peek(): IHeapNode<T> | undefined {\n\t\treturn this.L[1];\n\t}\n\n\t/**\n\t * Get and remove the smallest element in the heap as determined by the order of the comparer\n\t *\n\t * @returns The smallest value in the heap\n\t */\n\tpublic get(): T | undefined {\n\t\tif (this.L.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis.swap(1, this.count());\n\t\tconst x = this.L.pop();\n\t\tthis.fixdown(1);\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\treturn x!.value;\n\t}\n\n\t/**\n\t * Add a value to the heap\n\t *\n\t * @param x - value to add\n\t * @returns The heap node that contains the value\n\t */\n\tpublic add(x: T): IHeapNode<T> {\n\t\tconst node = { value: x, position: this.L.length };\n\t\tthis.L.push(node);\n\t\tthis.fixup(this.count());\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Allows for the Heap to be updated after a node's value changes.\n\t */\n\tpublic update(node: IHeapNode<T>): void {\n\t\tconst k = node.position;\n\t\tif (this.isGreaterThanParent(k)) {\n\t\t\tthis.fixup(k);\n\t\t} else {\n\t\t\tthis.fixdown(k);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given node from the heap.\n\t *\n\t * @param node - The node to remove from the heap.\n\t */\n\tpublic remove(node: IHeapNode<T>): void {\n\t\t// Move the node we want to remove to the end of the array\n\t\tconst position = node.position;\n\t\tthis.swap(node.position, this.L.length - 1);\n\t\tthis.L.splice(-1);\n\n\t\t// Update the swapped node assuming we didn't remove the end of the list\n\t\tif (position !== this.L.length) {\n\t\t\tthis.update(this.L[position]);\n\t\t}\n\t}\n\n\t/**\n\t * Get the number of elements in the Heap.\n\t *\n\t * @returns The number of elements in the Heap.\n\t */\n\tpublic count(): number {\n\t\treturn this.L.length - 1;\n\t}\n\n\tprivate fixup(pos: number): void {\n\t\tlet k = pos;\n\t\twhile (this.isGreaterThanParent(k)) {\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\tconst parent = k >> 1;\n\t\t\tthis.swap(k, parent);\n\t\t\tk = parent;\n\t\t}\n\t}\n\n\tprivate isGreaterThanParent(k: number): boolean {\n\t\t// eslint-disable-next-line no-bitwise\n\t\treturn k > 1 && this.comp.compare(this.L[k >> 1].value, this.L[k].value) > 0;\n\t}\n\n\tprivate fixdown(pos: number): void {\n\t\tlet k = pos;\n\t\t// eslint-disable-next-line no-bitwise\n\t\twhile (k << 1 <= this.count()) {\n\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\tlet j = k << 1;\n\t\t\tif (j < this.count() && this.comp.compare(this.L[j].value, this.L[j + 1].value) > 0) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif (this.comp.compare(this.L[k].value, this.L[j].value) <= 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.swap(k, j);\n\t\t\tk = j;\n\t\t}\n\t}\n\n\tprivate swap(k: number, j: number): void {\n\t\tconst tmp = this.L[k];\n\t\tthis.L[k] = this.L[j];\n\t\tthis.L[k].position = k;\n\t\tthis.L[j] = tmp;\n\t\tthis.L[j].position = j;\n\t}\n}\n"]}
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { assert } from "./assert.mjs";
|
|
6
|
+
export { compareArrays } from "./compare.mjs";
|
|
7
|
+
export { delay } from "./delay.mjs";
|
|
8
|
+
export { Heap, IComparer, IHeapNode, NumberComparer } from "./heap.mjs";
|
|
9
|
+
export { Lazy, LazyPromise } from "./lazy.mjs";
|
|
10
|
+
export { PromiseCache, PromiseCacheExpiry, PromiseCacheOptions } from "./promiseCache.mjs";
|
|
11
|
+
export { Deferred } from "./promises.mjs";
|
|
12
|
+
export { IPromiseTimer, IPromiseTimerResult, ITimer, PromiseTimer, setLongTimeout, Timer, } from "./timer.mjs";
|
|
13
|
+
export { unreachableCase } from "./unreachable.mjs";
|
|
14
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE;OACV,EAAE,aAAa,EAAE;OACjB,EAAE,KAAK,EAAE;OACT,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;OAC9C,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE;OACzD,EAAE,QAAQ,EAAE;OACZ,EACN,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,YAAY,EACZ,cAAc,EACd,KAAK,GACL;OACM,EAAE,eAAe,EAAE"}
|
package/lib/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
export { assert } from "./assert.mjs";
|
|
6
|
+
export { compareArrays } from "./compare.mjs";
|
|
7
|
+
export { delay } from "./delay.mjs";
|
|
8
|
+
export { Heap, NumberComparer } from "./heap.mjs";
|
|
9
|
+
export { Lazy, LazyPromise } from "./lazy.mjs";
|
|
10
|
+
export { PromiseCache } from "./promiseCache.mjs";
|
|
11
|
+
export { Deferred } from "./promises.mjs";
|
|
12
|
+
export { PromiseTimer, setLongTimeout, Timer, } from "./timer.mjs";
|
|
13
|
+
export { unreachableCase } from "./unreachable.mjs";
|
|
14
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,MAAM,EAAE;OACV,EAAE,aAAa,EAAE;OACjB,EAAE,KAAK,EAAE;OACT,EAAE,IAAI,EAAwB,cAAc,EAAE;OAC9C,EAAE,IAAI,EAAE,WAAW,EAAE;OACrB,EAAE,YAAY,EAA2C;OACzD,EAAE,QAAQ,EAAE;OACZ,EAIN,YAAY,EACZ,cAAc,EACd,KAAK,GACL;OACM,EAAE,eAAe,EAAE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { assert } from \"./assert\";\nexport { compareArrays } from \"./compare\";\nexport { delay } from \"./delay\";\nexport { Heap, IComparer, IHeapNode, NumberComparer } from \"./heap\";\nexport { Lazy, LazyPromise } from \"./lazy\";\nexport { PromiseCache, PromiseCacheExpiry, PromiseCacheOptions } from \"./promiseCache\";\nexport { Deferred } from \"./promises\";\nexport {\n\tIPromiseTimer,\n\tIPromiseTimerResult,\n\tITimer,\n\tPromiseTimer,\n\tsetLongTimeout,\n\tTimer,\n} from \"./timer\";\nexport { unreachableCase } from \"./unreachable\";\n"]}
|