Typescript 为什么;allowSyntheticDefaultImports“;及;esModuleInterop“;不工作?
这是我的文件结构和Typescript 为什么;allowSyntheticDefaultImports“;及;esModuleInterop“;不工作?,typescript,Typescript,这是我的文件结构和ts config。我已将“allowSyntheticDefaultImports”和“esModuleInterop”设置为true 但是,当我尝试从无默认文件导入时。将出现无默认错误 [1]: https://i.stack.imgur.com/nEOrB.png [2]: https://i.stack.imgur.com/A7wo0.png [3]: https://i.stack.imgur.com/1nxZp.png [4]: https://i.stack.im
ts config
。我已将“allowSyntheticDefaultImports”
和“esModuleInterop”
设置为true
但是,当我尝试从无默认文件导入时。将出现无默认错误
[1]: https://i.stack.imgur.com/nEOrB.png
[2]: https://i.stack.imgur.com/A7wo0.png
[3]: https://i.stack.imgur.com/1nxZp.png
[4]: https://i.stack.imgur.com/Qs0ZE.png