disable optimization from #6229 for calls with type arguments (#6791)

This commit is contained in:
Georgii Dolzhykov authored and Simon Lydell committed 2019-11-03 13:05:08 +01:00
1 parent 677b46df71
commit 12ba997207
3 files changed
+27 -1

No files matched your search

+3 -1
View File
@@ -4024,7 +4024,9 @@ function printArgumentsList(path, options, print) {
somePrintedArgumentsWillBreak ? breakParent : "",
conditionalGroup(
[
!somePrintedArgumentsWillBreak
!somePrintedArgumentsWillBreak &&
!node.typeArguments &&
!node.typeParameters
? simpleConcat
: ifBreak(allArgsBrokenOut(), simpleConcat),
shouldGroupFirst
@@ -231,3 +231,23 @@ function MyComponent(props) {
================================================================================
`;
exports[`type_args.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
const response = something.$http.get<ThingamabobService.DetailsData>(
\`api/foo.ashx/foo-details/\${myId}\`,
{ cache: quux.httpCache, timeout }
);
=====================================output=====================================
const response = something.$http.get<ThingamabobService.DetailsData>(
\`api/foo.ashx/foo-details/\${myId}\`,
{ cache: quux.httpCache, timeout }
);
================================================================================
`;
+4
View File
@@ -0,0 +1,4 @@
const response = something.$http.get<ThingamabobService.DetailsData>(
`api/foo.ashx/foo-details/${myId}`,
{ cache: quux.httpCache, timeout }
);