我正在尝试从包含
的@types/ng-file-upload/index.d.ts
导入模块
declare var angularFileUploadDefaultExport: string;
export = angularFileUploadDefaultExport;
declare module 'angular' {
export namespace angularFileUpload {
interface ImageDimensions {
}
}
}
现在如果我导入它如下
import * as ngFileUpload from 'ng-file-upload';
or
import 'ng-file-upload';
or
import ngFileUpload = require('ng-file-upload');
但是在尝试访问ngFileUpload.ImageDimensions
导入使用module
??
答案 0 :(得分:0)
鉴于它是在角度模块declare module 'angular' {
内定义的,因此无需导入它......只需将其直接用作angular.angularFileUpload