我正在尝试使用 @type/ngstorage
在我的angularjs v1.x(typescript)项目中导入npm软件包ngstorage index.d.ts
包含
declare namespace angular.storage {
export interface IStorageService {
}
}
如果我喜欢我的.ts
文件中的下面
import * as angular from 'angular';
var storage: angular.storage.IStorageService;
我正在汇编错误
名称空间角,没有导出的成员存储
最后我能够使它起作用
import { ngStorage } from 'ngStorage';
执行导入时的名称空间而不是软件包名称