mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Just always print out modifiers for global augmentations.
Apparently, they don't always need them!
This commit is contained in:
13
src/compiler/emitter.ts
Normal file → Executable file
13
src/compiler/emitter.ts
Normal file → Executable file
@@ -1862,17 +1862,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function emitModuleDeclaration(node: ModuleDeclaration) {
|
||||
if (node.flags & NodeFlags.GlobalAugmentation) {
|
||||
if (!hasModifier(node, ModifierFlags.Ambient)) {
|
||||
// Always emit a 'declare' keyword in case it wasn't provided by a factory function call.
|
||||
write("declare ");
|
||||
}
|
||||
else {
|
||||
emitModifiers(node, node.modifiers);
|
||||
}
|
||||
}
|
||||
else {
|
||||
emitModifiers(node, node.modifiers);
|
||||
emitModifiers(node, node.modifiers);
|
||||
if (~node.flags & NodeFlags.GlobalAugmentation) {
|
||||
write(node.flags & NodeFlags.Namespace ? "namespace " : "module ");
|
||||
}
|
||||
emit(node.name);
|
||||
|
||||
Reference in New Issue
Block a user