Lerna + TypeScript-解决导入声明与本地声明冲突

时间:2020-02-16 11:01:03

标签: reactjs typescript yarnpkg redux-saga lerna

我刚刚在lerna monorepo的一个包/子项目中安装了TypeScript。没有其他项目使用TypeScript,因此我觉得不需要在Lerna基础上安装Typescript。

一切都很好,除非我得到Import declaration conflicts with local declaration of ...有两个库类型的事实。

库为redux-sagareact-pose / pose-popmotion。 我已经尝试了很多事情,例如在基本的packages.json中使用noHoist设置。 因此,我最终在tsconfig上设置了skipLibCheck: true,现在我可以再次构建我的项目了。

我想知道这是否会使打字稿的可靠性降低?

使用skipLibCheck有很大的缺点吗?

有没有更清洁的解决方案来解决Import declaration conflicts问题?

非常感谢您的投入!

0 个答案:

没有答案