jazz-tools 0.19.4 → 0.19.5

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.
@@ -1,9 +0,0 @@
1
- export declare class CoValuePromise<T> extends Promise<T> {
2
- status: "pending" | "fulfilled" | "rejected";
3
- value: T | undefined;
4
- reason: unknown | undefined;
5
- static getRejected<T = never>(reason?: unknown): CoValuePromise<T>;
6
- static getFulfilled<T>(value: T): CoValuePromise<T>;
7
- constructor(executor: (resolve: (value: T) => void, reject: (reason?: unknown) => void) => void);
8
- }
9
- //# sourceMappingURL=promise.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../../src/tools/coValues/promise.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC/C,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAa;IACzD,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAE5B,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC;IAMlE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;gBAOjD,QAAQ,EAAE,CACR,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,KAC/B,IAAI;CAYZ"}
@@ -1,34 +0,0 @@
1
- export class CoValuePromise<T> extends Promise<T> {
2
- status: "pending" | "fulfilled" | "rejected" = "pending";
3
- value: T | undefined;
4
- reason: unknown | undefined;
5
-
6
- static getRejected<T = never>(reason?: unknown): CoValuePromise<T> {
7
- return new CoValuePromise<T>((resolve, reject) => {
8
- reject(reason);
9
- });
10
- }
11
-
12
- static getFulfilled<T>(value: T): CoValuePromise<T> {
13
- return new CoValuePromise<T>((resolve) => {
14
- resolve(value);
15
- });
16
- }
17
-
18
- constructor(
19
- executor: (
20
- resolve: (value: T) => void,
21
- reject: (reason?: unknown) => void,
22
- ) => void,
23
- ) {
24
- super((resolve, reject) => {
25
- const _resolve = (value: T) => {
26
- resolve(value);
27
- };
28
- const _reject = (reason?: unknown) => {
29
- reject(reason);
30
- };
31
- executor(_resolve, _reject);
32
- });
33
- }
34
- }