diff --git a/deploy/createTypesPackages.js b/deploy/createTypesPackages.js index b2a3e9beb..a1677f0fc 100644 --- a/deploy/createTypesPackages.js +++ b/deploy/createTypesPackages.js @@ -151,7 +151,7 @@ const go = async () => { async function updatePackageJSON(pkg, packagePath) { const pkgJSONPath = new URL("package.json", packagePath); const packageText = fs.readFileSync(pkgJSONPath, "utf8"); - /** @type {import("./template/package.json")} */ + /** @type {typeof import("./template/package.json")} */ const packageJSON = JSON.parse(packageText); packageJSON.name = pkg.name; packageJSON.description = pkg.description; diff --git a/src/build/bcd.ts b/src/build/bcd.ts index e6bc633f3..c54ceac85 100644 --- a/src/build/bcd.ts +++ b/src/build/bcd.ts @@ -1,4 +1,4 @@ -import * as Browser from "./types"; +import * as Browser from "./types.js"; import { CompatStatement, SimpleSupportStatement, diff --git a/src/build/bcd/mapper.ts b/src/build/bcd/mapper.ts index 8f674eb20..1238cd684 100644 --- a/src/build/bcd/mapper.ts +++ b/src/build/bcd/mapper.ts @@ -5,7 +5,7 @@ import { SimpleSupportStatement, } from "bcd-idl-mapper"; import api from "bcd-idl-mapper"; -import * as Browser from "../types"; +import * as Browser from "../types.js"; import { filterMapRecord, isEmptyRecord } from "../utils/record.js"; import { mapDefined } from "../helpers.js"; import { hasStableImplementation } from "./stable.js"; diff --git a/src/build/patches.ts b/src/build/patches.ts index d21404989..0b0da41df 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -1,5 +1,5 @@ import { parse, type Value, type Node } from "kdljs"; -import type { Enum, Event, Property, Interface, WebIdl } from "./types"; +import type { Enum, Event, Property, Interface, WebIdl } from "./types.js"; import { readdir, readFile } from "fs/promises"; import { merge } from "./helpers.js"; diff --git a/src/build/types.d.ts b/src/build/types.ts similarity index 100% rename from src/build/types.d.ts rename to src/build/types.ts diff --git a/tsconfig.json b/tsconfig.json index 768c6c291..930a16c85 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "es2022", - "module": "esnext", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", "outDir": "./lib", "strict": true, "esModuleInterop": true,