我最近得到了一个旧的 .ts 文件并想更新它。
两个警告说:
'namespace' and 'module' are disallowed
和
The internal 'module' syntax is deprecated, use the 'namespace' keyword instead.
我阅读了有关使用标准化 ES6 样式外部模块的信息,但我不知道如何执行此操作。
我的代码如下所示:
export namespace MySpace
{
export module MyModule
{
export interface MyInterface
{
}
export class MyClass
{
}
...
}
}
Run Code Online (Sandbox Code Playgroud)
谁能给我一个提示,如何将此结构更新为实际的样式规则?
非常感谢大家!
此致
地铁