0
私は、宣言からの拡張されたインポートの簡潔な方法を探しています。Typescriptでショートハンド環境モジュールのインポートを拡張する
Iは、以下を試みたが、の誤差を持って:error TS2507: Type 'any' is not a constructor function type.
例コードは以下である:
base.d.ts
declare module 'base';
derived.ts
import * as Base from 'base';
class Derived extends Base { // error TS2507: Type 'any' is not a constructor function type.
}
ええ、私はこれをしなければなりませんでした: 'declare module 'base' { interfaceコンストラクタ{ new(... args:any []):this; } const _:コンストラクタ。 export = _; } ' –