mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-07 18:25:51 -05:00
Added tests and accepted baselines.
This commit is contained in:
@@ -110,6 +110,29 @@ namespace ts {
|
||||
createSourceFile("source.ts", "", ScriptTarget.ES2015)
|
||||
));
|
||||
|
||||
|
||||
printsCorrectly("emptyGlobalAugmentation", {}, printer => printer.printNode(
|
||||
EmitHint.Unspecified,
|
||||
createModuleDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ [createToken(SyntaxKind.DeclareKeyword)],
|
||||
createIdentifier("global"),
|
||||
createModuleBlock(emptyArray),
|
||||
NodeFlags.GlobalAugmentation),
|
||||
createSourceFile("source.ts", "", ScriptTarget.ES2015)
|
||||
));
|
||||
|
||||
printsCorrectly("emptyGlobalAugmentationWithNoDeclareKeyword", {}, printer => printer.printNode(
|
||||
EmitHint.Unspecified,
|
||||
createModuleDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
/*modifiers*/ undefined,
|
||||
createIdentifier("global"),
|
||||
createModuleBlock(emptyArray),
|
||||
NodeFlags.GlobalAugmentation),
|
||||
createSourceFile("source.ts", "", ScriptTarget.ES2015)
|
||||
));
|
||||
|
||||
// https://github.com/Microsoft/TypeScript/issues/15971
|
||||
printsCorrectly("classWithOptionalMethodAndProperty", {}, printer => printer.printNode(
|
||||
EmitHint.Unspecified,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
declare module global { }
|
||||
@@ -0,0 +1 @@
|
||||
module global { }
|
||||
Reference in New Issue
Block a user