TypeScript/tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.js
2014-07-12 17:30:19 -07:00

11 lines
287 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("");