在下面的示例中,我希望将合并的类ConsoleCommandsParser
和命名空间导出ConsoleCommandParserTypes
为ConsoleCommandsParser
. 很简单,它都在一个文件中声明,但这是另一种情况。
import ConsoleCommandParserTypes from "./ConsoleCommandParserTypes";
export abstract class ConsoleCommandsParser {
public static parse(arrayedConsoleCommand: Array<string>): void {
// not implemented yet
}
}
// Invalid syntax
export namespace ConsoleCommandParserTypes as ConsoleCommandParser;
// Namespace can not be used as value
export ConsoleCommandParser = ConsoleCommandParserTypes
// Invalid syntax
export namespace ConsoleCommandParser = ConsoleCommandParserTypes;