@@ -92,67 +92,74 @@ var arr: any[];
92
92
93
93
94
94
//// [taggedTemplateStringsTypeArgumentInference.js]
95
+ var __getTemplateObject = ( this && this . __getTemplateObject ) || function ( cooked , raw ) {
96
+ if ( Object . freeze && Object . defineProperty ) {
97
+ return Object . freeze ( Object . defineProperty ( cooked , "raw" , { value : Object . freeze ( raw ) } ) ) ;
98
+ }
99
+ cooked . raw = raw ;
100
+ return cooked ;
101
+ } ;
95
102
// Generic tag with one parameter
96
103
function noParams ( n ) { }
97
- ( _a = [ "" ] , _a . raw = [ "" ] , noParams ( _a ) ) ;
104
+ noParams ( _a || ( _a = __getTemplateObject ( [ "" ] , [ "" ] ) ) ) ;
98
105
// Generic tag with parameter which does not use type parameter
99
106
function noGenericParams ( n ) { }
100
- ( _b = [ "" ] , _b . raw = [ "" ] , noGenericParams ( _b ) ) ;
107
+ noGenericParams ( _b || ( _b = __getTemplateObject ( [ "" ] , [ "" ] ) ) ) ;
101
108
// Generic tag with multiple type parameters and only one used in parameter type annotation
102
109
function someGenerics1a ( n , m ) { }
103
- ( _c = [ "" , "" ] , _c . raw = [ "" , "" ] , someGenerics1a ( _c , 3 ) ) ;
110
+ someGenerics1a ( _c || ( _c = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , 3 ) ;
104
111
function someGenerics1b ( n , m ) { }
105
- ( _d = [ "" , "" ] , _d . raw = [ "" , "" ] , someGenerics1b ( _d , 3 ) ) ;
112
+ someGenerics1b ( _d || ( _d = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , 3 ) ;
106
113
// Generic tag with argument of function type whose parameter is of type parameter type
107
114
function someGenerics2a ( strs , n ) { }
108
- ( _e = [ "" , "" ] , _e . raw = [ "" , "" ] , someGenerics2a ( _e , function ( n ) { return n ; } ) ) ;
115
+ someGenerics2a ( _e || ( _e = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , function ( n ) { return n ; } ) ;
109
116
function someGenerics2b ( strs , n ) { }
110
- ( _f = [ "" , "" ] , _f . raw = [ "" , "" ] , someGenerics2b ( _f , function ( n , x ) { return n ; } ) ) ;
117
+ someGenerics2b ( _f || ( _f = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , function ( n , x ) { return n ; } ) ;
111
118
// Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter
112
119
function someGenerics3 ( strs , producer ) { }
113
- ( _g = [ "" , "" ] , _g . raw = [ "" , "" ] , someGenerics3 ( _g , function ( ) { return '' ; } ) ) ;
114
- ( _h = [ "" , "" ] , _h . raw = [ "" , "" ] , someGenerics3 ( _h , function ( ) { return undefined ; } ) ) ;
115
- ( _j = [ "" , "" ] , _j . raw = [ "" , "" ] , someGenerics3 ( _j , function ( ) { return 3 ; } ) ) ;
120
+ someGenerics3 ( _g || ( _g = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , function ( ) { return '' ; } ) ;
121
+ someGenerics3 ( _h || ( _h = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , function ( ) { return undefined ; } ) ;
122
+ someGenerics3 ( _j || ( _j = __getTemplateObject ( [ "" , "" ] , [ "" , "" ] ) ) , function ( ) { return 3 ; } ) ;
116
123
// 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type
117
124
function someGenerics4 ( strs , n , f ) { }
118
- ( _k = [ "" , "" , "" ] , _k . raw = [ "" , "" , "" ] , someGenerics4 ( _k , 4 , function ( ) { return null ; } ) ) ;
119
- ( _l = [ "" , "" , "" ] , _l . raw = [ "" , "" , "" ] , someGenerics4 ( _l , '' , function ( ) { return 3 ; } ) ) ;
120
- ( _m = [ "" , "" , "" ] , _m . raw = [ "" , "" , "" ] , someGenerics4 ( _m , null , null ) ) ;
125
+ someGenerics4 ( _k || ( _k = __getTemplateObject ( [ "" , "" , "" ] , [ "" , "" , "" ] ) ) , 4 , function ( ) { return null ; } ) ;
126
+ someGenerics4 ( _l || ( _l = __getTemplateObject ( [ "" , "" , "" ] , [ "" , "" , "" ] ) ) , '' , function ( ) { return 3 ; } ) ;
127
+ someGenerics4 ( _m || ( _m = __getTemplateObject ( [ "" , "" , "" ] , [ "" , "" , "" ] ) ) , null , null ) ;
121
128
// 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type
122
129
function someGenerics5 ( strs , n , f ) { }
123
- ( _o = [ "" , " " , "" ] , _o . raw = [ "" , " " , "" ] , someGenerics5 ( _o , 4 , function ( ) { return null ; } ) ) ;
124
- ( _p = [ "" , "" , "" ] , _p . raw = [ "" , "" , "" ] , someGenerics5 ( _p , '' , function ( ) { return 3 ; } ) ) ;
125
- ( _q = [ "" , "" , "" ] , _q . raw = [ "" , "" , "" ] , someGenerics5 ( _q , null , null ) ) ;
130
+ someGenerics5 ( _o || ( _o = __getTemplateObject ( [ "" , " " , "" ] , [ "" , " " , "" ] ) ) , 4 , function ( ) { return null ; } ) ;
131
+ someGenerics5 ( _p || ( _p = __getTemplateObject ( [ "" , "" , "" ] , [ "" , "" , "" ] ) ) , '' , function ( ) { return 3 ; } ) ;
132
+ someGenerics5 ( _q || ( _q = __getTemplateObject ( [ "" , "" , "" ] , [ "" , "" , "" ] ) ) , null , null ) ;
126
133
// Generic tag with multiple arguments of function types that each have parameters of the same generic type
127
134
function someGenerics6 ( strs , a , b , c ) { }
128
- ( _r = [ "" , "" , "" , "" ] , _r . raw = [ "" , "" , "" , "" ] , someGenerics6 ( _r , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
129
- ( _s = [ "" , "" , "" , "" ] , _s . raw = [ "" , "" , "" , "" ] , someGenerics6 ( _s , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
130
- ( _t = [ "" , "" , "" , "" ] , _t . raw = [ "" , "" , "" , "" ] , someGenerics6 ( _t , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
135
+ someGenerics6 ( _r || ( _r = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
136
+ someGenerics6 ( _s || ( _s = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
137
+ someGenerics6 ( _t || ( _t = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
131
138
// Generic tag with multiple arguments of function types that each have parameters of different generic type
132
139
function someGenerics7 ( strs , a , b , c ) { }
133
- ( _u = [ "" , "" , "" , "" ] , _u . raw = [ "" , "" , "" , "" ] , someGenerics7 ( _u , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
134
- ( _v = [ "" , "" , "" , "" ] , _v . raw = [ "" , "" , "" , "" ] , someGenerics7 ( _v , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
135
- ( _w = [ "" , "" , "" , "" ] , _w . raw = [ "" , "" , "" , "" ] , someGenerics7 ( _w , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ) ;
140
+ someGenerics7 ( _u || ( _u = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
141
+ someGenerics7 ( _v || ( _v = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
142
+ someGenerics7 ( _w || ( _w = __getTemplateObject ( [ "" , "" , "" , "" ] , [ "" , "" , "" , "" ] ) ) , function ( n ) { return n ; } , function ( n ) { return n ; } , function ( n ) { return n ; } ) ;
136
143
// Generic tag with argument of generic function type
137
144
function someGenerics8 ( strs , n ) { return n ; }
138
- var x = (_x = ["", ""], _x.raw = ["", ""], someGenerics8(_x, someGenerics7) );
139
- (_y = ["", "", "", ""], _y.raw = ["", "", "", ""], x(_y, null, null, null) );
145
+ var x = someGenerics8 (_x || (_x = __getTemplateObject( ["", ""], ["", ""])), someGenerics7);
146
+ x (_y || (_y = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), null, null, null);
140
147
// Generic tag with multiple parameters of generic type passed arguments with no best common type
141
148
function someGenerics9(strs, a, b, c) {
142
149
return null ;
143
150
}
144
- var a9a = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, '', 0, []) );
151
+ var a9a = someGenerics9 (_z || (_z = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), '', 0, []);
145
152
var a9a;
146
- var a9e = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, undefined, { x : 6 , z : new Date ( ) } , { x : 6 , y : '' } ) );
153
+ var a9e = someGenerics9 (_0 || (_0 = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), undefined, { x : 6 , z : new Date ( ) } , { x : 6 , y : '' } );
147
154
var a9e;
148
155
// Generic tag with multiple parameters of generic type passed arguments with a single best common type
149
- var a9d = (_1 = ["", "", "", ""], _1.raw = ["", "", "", ""], someGenerics9(_1, { x : 3 } , { x : 6 } , { x : 6 } ) );
156
+ var a9d = someGenerics9 (_1 || (_1 = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), { x : 3 } , { x : 6 } , { x : 6 } );
150
157
var a9d;
151
158
// Generic tag with multiple parameters of generic type where one argument is of type 'any'
152
159
var anyVar;
153
- var a = (_2 = ["", "", "", ""], _2.raw = ["", "", "", ""], someGenerics9(_2, 7, anyVar, 4) );
160
+ var a = someGenerics9 (_2 || (_2 = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), 7, anyVar, 4);
154
161
var a;
155
162
// Generic tag with multiple parameters of generic type where one argument is [] and the other is not 'any'
156
- var arr = (_3 = ["", "", "", ""], _3.raw = ["", "", "", ""], someGenerics9(_3, [], null, undefined) );
163
+ var arr = someGenerics9 (_3 || (_3 = __getTemplateObject( ["", "", "", ""], ["", "", "", ""])), [], null, undefined);
157
164
var arr;
158
165
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
0 commit comments