【问题标题】:Cannot invoke an expression whose type lacks a call signature when importing google-cloud/storage导入 google-cloud/storage 时无法调用类型缺少调用签名的表达式
【发布时间】:2019-03-01 04:17:12
【问题描述】:

所以我一直在尝试在打字稿中导入 google-cloud/storage(如图所示),但它一直给我这个错误。做 const gcs = Storage;不会抛出错误,但我不确定这是一个实际的解决方案。

错误信息

【问题讨论】:

    标签: typescript firebase google-cloud-storage


    【解决方案1】:

    快速查看声明文件('@google-cloud/storage' 上的“转到定义”)表明正确的使用模式如下:

    import { Storage } from '@google-cloud/storage';
    const gcs = new Storage();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-01
      • 2017-12-19
      • 2021-02-06
      • 2017-07-14
      • 2017-03-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多