【问题标题】:firebase admin code completions not working in vscodefirebase 管理代码完成在 vscode 中不起作用
【发布时间】:2018-12-29 22:48:54
【问题描述】:

我尝试使用以下方法安装打字稿:

npm install --save-dev @types/firebase 

但没有运气。

“firebase-admin”、“firebase-functions”没有任何代码完成或智能感知。我可以用什么方法来解决这个问题?

我尝试在我的 node.js 索引文件的开头添加它。

"/// <reference path="./node_modules/@types/firebase" />

这里没有运气。

【问题讨论】:

    标签: node.js typescript firebase visual-studio-code typescript-typings


    【解决方案1】:

    firebase 和 firebase admin 的类型通常包含在 NPM 包中,只需在 node_modules 文件夹中查看即可。我用最常见的设置为你做了一个小演示 repo。代码完成按预期工作,编译也是如此。

    https://github.com/giespaepen/firebase-admin-demo

    【讨论】:

    • 非常感谢您的工作。我不熟悉打字稿。我使用 javascript 进行编码(我的项目中的 index.js)。它也适用于 javascript 吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-04
    • 2010-10-28
    • 2014-10-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多