Closed mamboer closed 1 month ago
Latest commit: b54dc26f1cfe32a94b7736b25dedd7e3d897d87d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
export = xxx
是为了兼容esModule和commonjs的写法,typescript也给出了esModuleInterop
的配置项处理这种情况,经验证你的写法在commonjs中是无效的
没有考虑到 commonjs 的情况哈,
不过奇怪的是 tsconfig.json
里面设置了 esModuleInterop
和 allowSyntheticDefaultImports
均为 true
,还是会报这个错误。
相关 Issue / Related Issue
539
这个 PR 是什么类型?/ What type of PR is this?
这个 PR 做了什么?/ What does this PR do?
修复
export = xxx
的写法在 typescript 5.6.x 下报错:文档 / Docs
无文档
测试 / Testing
pnpm test
测试正常