diff --git a/crates/swc/tests/tsc-references/taggedTemplateStringsTypeArgumentInferenceES6.2.minified.js b/crates/swc/tests/tsc-references/taggedTemplateStringsTypeArgumentInferenceES6.2.minified.js index e2984e50e808..68d8549c3681 100644 --- a/crates/swc/tests/tsc-references/taggedTemplateStringsTypeArgumentInferenceES6.2.minified.js +++ b/crates/swc/tests/tsc-references/taggedTemplateStringsTypeArgumentInferenceES6.2.minified.js @@ -1,6 +1,5 @@ //// [taggedTemplateStringsTypeArgumentInferenceES6.ts] // Generic tag with one parameter -var anyVar; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter function someGenerics3(strs, producer) {} // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type @@ -11,14 +10,16 @@ function someGenerics5(strs, n, f) {} function someGenerics6(strs, a, b, c) {} // Generic tag with multiple arguments of function types that each have parameters of different generic type function someGenerics7(strs, a, b, c) {} +someGenerics3`${()=>''}`, someGenerics3`${()=>void 0}`, someGenerics3`${()=>3}`, someGenerics4`${4}${()=>null}`, someGenerics4`${''}${()=>3}`, someGenerics4`${null}${null}`, someGenerics5`${4} ${()=>null}`, someGenerics5`${''}${()=>3}`, someGenerics5`${null}${null}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`; +var anyVar, x = // Generic tag with argument of generic function type +(function(strs, n) { + return n; +})`${someGenerics7}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type function someGenerics9(strs, a, b, c) { return null; } -someGenerics3`${()=>''}`, someGenerics3`${()=>void 0}`, someGenerics3`${()=>3}`, someGenerics4`${4}${()=>null}`, someGenerics4`${''}${()=>3}`, someGenerics4`${null}${null}`, someGenerics5`${4} ${()=>null}`, someGenerics5`${''}${()=>3}`, someGenerics5`${null}${null}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics6`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`, someGenerics7`${(n)=>n}${(n)=>n}${(n)=>n}`, // Generic tag with argument of generic function type -(function(strs, n) { - return n; -})`${someGenerics7}``${null}${null}${null}`, someGenerics9`${''}${0}${[]}`, someGenerics9`${void 0}${{ +x`${null}${null}${null}`, someGenerics9`${''}${0}${[]}`, someGenerics9`${void 0}${{ x: 6, z: new Date() }}${{ diff --git a/crates/swc/tests/tsc-references/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.2.minified.js b/crates/swc/tests/tsc-references/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.2.minified.js index e7d3e5ef6496..6bb58d6ee5c3 100644 --- a/crates/swc/tests/tsc-references/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.2.minified.js +++ b/crates/swc/tests/tsc-references/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.2.minified.js @@ -1,2 +1,3 @@ //// [taggedTemplateStringsWithManyCallAndMemberExpressionsES6.ts] -new new new (void 0)`abc${0}def`.member("hello")(42); +var f; +new new new f`abc${0}def`.member("hello")(42);