This change makes it easier to use an explicit `lib` configuration and types, which resolves type issues resulting from subtle mismatches between implied type imports (e.g., some files importing `ReadableStream` from TS's built-in Web API types and others importing from Node.js's `streams/web`).
}
},
"scripts": {
- "types": "tsc ./src/index.js --allowJs --declaration --emitDeclarationOnly --declarationMap --outFile ./types/index.d.ts",
+ "types": "tsc",
"test": "node --test --test-skip-pattern=\"/^large:/\"",
"test:large": "node --test --test-name-pattern=\"/^large:/\"",
"test:coverage": "npm run test -- --experimental-test-coverage",
"bench": "node ./benchmark/core.bench.js"
},
"devDependencies": {
+ "@types/node": "^22.15.21",
"typescript": "^5.8.3"
}
}
--- /dev/null
+{
+ "files": ["./src/index.js"],
+ "compilerOptions": {
+ "target": "ESNext",
+ "lib": ["ESNext"],
+ "module": "NodeNext",
+ "allowJs": true,
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outFile": "./types/index.d.ts",
+ "strict": true
+ }
+}