chore: pass full package typecheck
MODIFY
packages/promise-kit/jsconfig.json
packages/promise-kit/jsconfig.json
"noEmit": true,
"downlevelIteration": true,
"strictNullChecks": true,
- "moduleResolution": "node"
+ "moduleResolution": "node",
+ "types": [
+ "node"
+ ],
},
"include": [
"**/*.js",

MODIFY
packages/promise-kit/package.json
packages/promise-kit/package.json
"devDependencies": {
"@endo/eslint-config": "^0.5.1",
"@endo/ses-ava": "^0.2.34",
+ "@types/node": ">=14.0",
"ava": "^3.12.1",
"babel-eslint": "^10.0.3",
"c8": "^7.7.3",

MODIFY
packages/promise-kit/test/test-promise-kit.js
packages/promise-kit/test/test-promise-kit.js
@@ -22,6 +22,8 @@ if (typeof globalThis.gc !== 'function') {
engineGC = globalThis.gc;
}
+/** @type {typeof rawTest} */
+// @ts-expect-error cast
const test = wrapTest(rawTest);
test('makePromiseKit', async t => {
@@ -58,7 +60,7 @@ function testRacePromise(t, candidate) {
const result = Promise.resolve(candidate);
bothResults = Promise.allSettled([raced, result]);
- fr.register(raced, collected.resolve);
+ fr.register(raced, () => collected.resolve(undefined));
})();
return bothResults
@@ -67,7 +69,7 @@ function testRacePromise(t, candidate) {
})
.then(() => {
const sentinelCollected = new Promise(resolve => {
- fr.register({}, resolve);
+ fr.register({}, () => resolve(undefined));
});
new Promise(resolve => {

MODIFY
yarn.lock
yarn.lock
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==
-"@types/node@*", "@types/node@>= 8":
+"@types/node@*", "@types/node@>= 8", "@types/node@>=14.0":
version "14.14.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785"
integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ==

chore: pass full package typecheck