The type in lib.d.ts uses export default where the lib.js file uses module.exports =. This will cause TypeScript under the node16 and nodenext module resolution mode to think an extra .default property access is required, but that will fail at runtime. This type should use export = instead of export default.
The type in lib.d.ts uses export default where the lib.js file uses module.exports =. This will cause TypeScript under the node16 and nodenext module resolution mode to think an extra .default property access is required, but that will fail at runtime. This type should use export = instead of export default.
Further reading about the specifics of the issue can be found here: https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseExportDefault.md
This pull request aims to fix import issues for Typescript projects using --moduleResolution node16 or nodenext