gpt4 book ai didi

typescript - typescript 类型定义的版本控制 (@types/)

转载 作者:搜寻专家 更新时间:2023-10-30 21:01:02 27 4
gpt4 key购买 nike

是否有关于基础包的版本如何与来自 @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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com