@firebase/app-types@0.x 有什么作用,我应该在什么时候使用它?

What does @firebase/app-types@0.x do and when should I use it?

在 yarn 链接其依赖项的阶段,我收到以下警告块:

warning "firebase > @firebase/database@0.2.2" has unmet peer dependency "@firebase/app-types@0.x".  
warning "firebase > @firebase/firestore@0.4.1" has unmet peer dependency "@firebase/app-types@0.x".  
warning "firebase > @firebase/functions@0.1.1" has unmet peer dependency "@firebase/app-types@0.x".
...

更多 unment peer dependency 关于 "@firebase/app-types@0.x" 来自不同 firebase 包的警告,为了更好的可读性,我在此处删除了它们。

...  
warning " > flotjs@0.1.3" has unmet peer dependency "dom-tools@^0.1.1".  
warning " > flotjs@0.1.3" has unmet peer dependency "wolfy87-eventemitter@^4.3.0".  

虽然看了The docs about dependency types,还是没看懂:

1) 什么是对等依赖? [现在我知道了……请阅读下面的编辑]
2)为什么以及如何使用它们? [现在我知道了......请阅读下面的编辑]

这种不理解也导致我不确定我应该如何处理 yarn 提供的那些警告。

3) 我应该添加 @firebase/app-types@0.xdom-tools@^0.1.1wolfy87-eventemitter@^4.3.0 作为依赖项吗?
4) 如果是,那么它们应该是正常依赖还是开发依赖?

编辑:
有人建议这是 Why use peer dependencies in npm for plugins? 的副本,所以我去阅读了它。我现在更好地理解了一般的对等依赖性是什么,我确实建议每个达到这个 Q 的人都不了解对等依赖性是什么,然后继续阅读那里提供的问题和答案。

尽管如此,我仍然不知道如何解决上述警告,Q 的 3 和 4 对我来说仍然没有答案。

我确实理解@firebase/firestore@0.4.1 希望我在与它通信时以某种方式在@firebase/app-types@0.x 中使用该代码...但我不知道我在哪里,什么时候应该这样做。

我不使用它的事实可能意味着它是我实际上不需要的可选的东西,这使得它 "an implementation detail"(使用 中的语言)或者我我在使用@firebase/firestore@0.4.1.

时遗漏了一些东西

我不是在询问 plotjs 的对等依赖性,因为 plotjs 不是我直接开始使用的东西,所以我猜测可选 "implementation detail" 的第一个选项适用于此(至少现在是这样) ).

所以也许有人可以更深入地了解@firebase/app-types@0.x 的作用以及如何以及何时使用它 can/should?

根据一位维护 firebase javascript sdk 的合作者的说法,此警告是由 yarn 中的一个已知错误生成的。 See this related issue in the firebase-js-sdk:

After a quick google search, It appears to be a known issue with yarn. If a peer dependency is installed by a dependency's dependency (I know it's a mouthful), yarn will complain about it. Your product is totally safe, there is nothing to worry about. You can also use npm install instead, and there is no warning.

总之:忽略 "@firebase/..." has unmet peer dependency "@firebase/app-types@0.x". 警告。