访问模块中导出的类的静态成员

时间:2015-07-31 18:17:09

标签: typescript

我有一些打字稿代码:

CFReadStream

我希望从单独编译的文件中访问它。我试过了:

SecTransform

但是这会出错:

module MyModule {
    export class MyClass {
        static MyStaticMember : string;
    }
}

如何访问此成员变量?

1 个答案:

答案 0 :(得分:0)

Somewhere in this file or the other one, you have a top-level import or export. This turns your file into an external module, which means that separate declarations MyModule create new modules instead of merging together.

See also