Added tests and accepted baselines.
This commit is contained in:
parent
6a34dc953a
commit
764af0e781
3 changed files with 25 additions and 0 deletions
|
@ -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 { }
|
Loading…
Reference in a new issue