ts-node ignores d.ts files while tsc successfully compiles the project

只愿长相守 提交于 2019-12-03 23:36:13

ts-node --files src/boot.ts

ts-node in 7.0.0, default do not Load files from tsconfig.json on startup, you should specific --files

I spent way to much time on this issue tried almost everything like adding to typeRoots my typings folder, creating typing folder with structure typings/module/index.d.ts but nothing worked out so now I've figured it out now what the above answer meant

With a new version of ts-node I've changed for my project's scripts:

ts-node@6: ts-node src/index.ts
ts-node@7: ts-node --files src/index

With the above in action your compile time increase a lot but I couldn't spend more time on this so I'm sticking to the above.

You also might like to visit https://github.com/TypeStrong/ts-node#help-my-types-are-missing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!