【发布时间】:2017-02-16 08:57:27
【问题描述】:
我想使用 Google 的 JS API,所以我将它包含在我的 index.html 中并使用 typings install dt~gapi --global --save 安装了类型
我的 IDE (Webstorm) 显示变量 gapi 具有 auth 和 client 作为函数,但它没有显示这两个函数的子函数。当我包括
/// <reference path="../../../typings/globals/gapi/index.d.ts" /> 在我的服务顶部一切正常。
/// <reference path="../../../typings/globals/gapi/index.d.ts" />
export class foo {
constructor() {
gapi.auth.authorize({
//my config
});
}
}
那么我错过了什么或者这是正确的方法吗?
【问题讨论】:
-
我有(我认为)同样的问题。可以加点代码吗?
-
添加了一些代码
标签: angular typescript typescript-typings google-api-js-client