ci: add lint:types
ADD
packages/import-bundle/jsconfig.json
+{
+ "compilerOptions": {
+ "target": "esnext",
+ "module": "esnext",
+ "checkJs": true,
+ "noEmit": true,
+ "downlevelIteration": true,
+ "strictNullChecks": true,
+ "moduleResolution": "node",
+ "types": [
+ "node",
+ ]
+ },
+ "include": [
+ "*.js",
+ "*.ts",
+ "src/**/*.js",
+ "src/**/*.ts"
+ ]
+}

MODIFY
packages/import-bundle/package.json
packages/import-bundle/package.json
"build": "exit 0",
"lint-check": "yarn lint",
"lint-fix": "eslint --fix '**/*.js'",
- "lint": "eslint '**/*.js'"
+ "lint": "yarn lint:types && yarn lint:eslint",
+ "lint:eslint": "eslint .",
+ "lint:types": "tsc -p jsconfig.json"
},
"dependencies": {
"@endo/base64": "^0.2.28",

MODIFY
packages/import-bundle/src/index.js
packages/import-bundle/src/index.js
@@ -35,6 +35,7 @@ export async function importBundle(bundle, options = {}) {
inescapableTransforms.length ||
Object.keys(inescapableGlobalProperties).length
) {
+ // @ts-expect-error TS2322 no match for the signature
CompartmentToUse = wrapInescapableCompartment(
Compartment,
inescapableTransforms,
@@ -52,6 +53,7 @@ export async function importBundle(bundle, options = {}) {
const { namespace } = await archive['import']({
globals: endowments,
__shimTransforms__: transforms,
+ // @ts-expect-error TS2740 missing properties from type
Compartment: CompartmentToUse,
});
// namespace.default has the default export

ci: add lint:types