是否有关于基础包的版本如何与来自 @types 的版本相关的文档?在 typescript 中使用?
我看到它们不是 1:1 和 f.eg。对于 React 15.4.2,我应该使用什么 @types/react?
最佳答案
There is open issue about that on DefinitelyTyped .到目前为止,no one was able to do anything about it .
I saw that they are not 1:1 and f.eg. for react 15.4.2 what @types/react should I use?
找到与库的特定版本兼容的打字版本的唯一方法是反复试验。
根据我的经验,如果您使用最新版本的图书馆,在大多数情况下,将 *
指定为 package.json
中的输入版本是可行的。
关于typescript - typescript 类型定义的版本控制 (@types/),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47532407/