mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Just always print out modifiers for global augmentations.
Apparently, they don't always need them!
This commit is contained in:
parent
d30c3dcb4d
commit
ffa1ea72c1
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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user