mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Added printer test for 'new (f().x)'.
This commit is contained in:
@@ -110,6 +110,19 @@ namespace ts {
|
||||
createSourceFile("source.ts", "", ScriptTarget.ES2015)
|
||||
));
|
||||
|
||||
printsCorrectly("newExpressionWithPropertyAccessOnCallExpression", {}, printer => printer.printNode(
|
||||
EmitHint.Unspecified,
|
||||
createNew(
|
||||
createPropertyAccess(
|
||||
createCall(
|
||||
createIdentifier("f"), /*typeArguments*/ undefined, /*argumentsArray*/ undefined),
|
||||
"x"),
|
||||
/*typeArguments*/ undefined,
|
||||
/*argumentsArray*/ undefined
|
||||
),
|
||||
createSourceFile("source.ts", "", ScriptTarget.ESNext))
|
||||
);
|
||||
|
||||
// https://github.com/Microsoft/TypeScript/issues/15971
|
||||
printsCorrectly("classWithOptionalMethodAndProperty", {}, printer => printer.printNode(
|
||||
EmitHint.Unspecified,
|
||||
|
||||
Reference in New Issue
Block a user