typescript-tutorial icon indicating copy to clipboard operation
typescript-tutorial copied to clipboard

namespace成员访问问题

Open tomwang1013 opened this issue 5 years ago • 0 comments
trafficstars

我看一些文章说namespace中的成员要加上export关键字才能被外界访问到,好像这个教程中没有加,也没有提到这一点。是否是错误呢?

export namespace foo {
    const name: string;
    namespace bar {
        function baz(): string;
    }
}

tomwang1013 avatar Oct 10 '20 07:10 tomwang1013