TypeScript/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.js
2014-08-14 16:36:33 -07:00

11 lines
310 B
JavaScript

//// [newExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts]
interface I<T> {
new <U extends T>(u: U): U;
}
var i: I<string>;
var y = new i(""); // y should be string
//// [newExpressionWithTypeParameterConstrainedToOuterTypeParameter.js]
var i;
var y = new i(""); // y should be string