环境声明中的内部模块是否有办法使用外部模块中的类型?

时间:2014-01-18 19:35:03

标签: typescript

在本声明中,我希望界面ITest从外部模块'modA'获得“ModA”类型的属性'modA':

declare module foo {
    interface ITest {
        str: string;
        modA: ModA;
    }
}

declare module "modA" {
    class ModA {
        num: number;
    }
    export = ModA;
}

1 个答案:

答案 0 :(得分:0)

使用外部模块无处不在,然后使用RequireJS包中的r.js对其进行优化。