more-proms 1.3.1 → 1.3.2
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.
|
@@ -3,12 +3,12 @@ type P<Args extends unknown[], Ret> = {
|
|
|
3
3
|
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): P<Args, Ret | TResult>;
|
|
4
4
|
} & ((...a: Args) => (CancelAblePromise<Ret> | Promise<Ret> | undefined));
|
|
5
5
|
export declare function latestLatent<Args extends unknown[], Ret>(cb: (...args: Args) => (CancelAblePromise<Ret> | Promise<Ret> | undefined)): P<Args, Ret>;
|
|
6
|
-
export declare class SettledPromise<T =
|
|
6
|
+
export declare class SettledPromise<T = void> extends Promise<T> {
|
|
7
7
|
settled: boolean;
|
|
8
8
|
onSettled: Promise<void>;
|
|
9
9
|
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
|
|
10
10
|
}
|
|
11
|
-
export declare class ResablePromise<T =
|
|
11
|
+
export declare class ResablePromise<T = void> extends SettledPromise<T> {
|
|
12
12
|
readonly res: (t: T) => void;
|
|
13
13
|
readonly rej: (err: any) => void;
|
|
14
14
|
constructor(executor?: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
|
|
@@ -3,12 +3,12 @@ type P<Args extends unknown[], Ret> = {
|
|
|
3
3
|
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): P<Args, Ret | TResult>;
|
|
4
4
|
} & ((...a: Args) => (CancelAblePromise<Ret> | Promise<Ret> | undefined));
|
|
5
5
|
export declare function latestLatent<Args extends unknown[], Ret>(cb: (...args: Args) => (CancelAblePromise<Ret> | Promise<Ret> | undefined)): P<Args, Ret>;
|
|
6
|
-
export declare class SettledPromise<T =
|
|
6
|
+
export declare class SettledPromise<T = void> extends Promise<T> {
|
|
7
7
|
settled: boolean;
|
|
8
8
|
onSettled: Promise<void>;
|
|
9
9
|
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
|
|
10
10
|
}
|
|
11
|
-
export declare class ResablePromise<T =
|
|
11
|
+
export declare class ResablePromise<T = void> extends SettledPromise<T> {
|
|
12
12
|
readonly res: (t: T) => void;
|
|
13
13
|
readonly rej: (err: any) => void;
|
|
14
14
|
constructor(executor?: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "more-proms",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "A collection of additional promise extending classes. Including a (from the outside) ResablePromise, CancelAblePromise and a latestLatent utility function.",
|
|
5
5
|
"main": "./app/dist/esm/moreProms.mjs",
|
|
6
6
|
"types": "./app/dist/esm/moreProms.d.ts",
|