@agoric/internal 0.2.2-dev-381b9d1.0 → 0.2.2-dev-1b2a03f.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/package.json +3 -3
- package/src/queue.d.ts +1 -1
- package/src/queue.d.ts.map +1 -1
- package/src/queue.js +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.2.2-dev-
|
|
3
|
+
"version": "0.2.2-dev-1b2a03f.0+1b2a03f",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint:types": "tsc -p jsconfig.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/zone": "0.1.1-dev-
|
|
23
|
+
"@agoric/zone": "0.1.1-dev-1b2a03f.0+1b2a03f",
|
|
24
24
|
"@endo/far": "^0.2.17",
|
|
25
25
|
"@endo/marshal": "^0.8.4",
|
|
26
26
|
"@endo/promise-kit": "^0.2.55",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "1b2a03fa6fa9c74e74523fc1f81f37b194cfd118"
|
|
43
43
|
}
|
package/src/queue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function makeWithQueue(): (inner:
|
|
1
|
+
export function makeWithQueue(): <T extends any[], R>(inner: (...args: T) => Promise<R>) => (...args: T) => Promise<R>;
|
|
2
2
|
//# sourceMappingURL=queue.d.ts.map
|
package/src/queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AAMO,
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AAMO,uHAiDN"}
|
package/src/queue.js
CHANGED
|
@@ -27,7 +27,16 @@ export const makeWithQueue = () => {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @template {any[]} T
|
|
32
|
+
* @template R
|
|
33
|
+
* @param {(...args: T) => Promise<R>} inner
|
|
34
|
+
*/
|
|
30
35
|
return function withQueue(inner) {
|
|
36
|
+
/**
|
|
37
|
+
* @param {T} args
|
|
38
|
+
* @returns {Promise<R>}
|
|
39
|
+
*/
|
|
31
40
|
return function queueCall(...args) {
|
|
32
41
|
// Curry the arguments into the inner function, and
|
|
33
42
|
// resolve/reject with whatever the inner function does.
|