17 lines
353 B
JavaScript
17 lines
353 B
JavaScript
//// [assignmentCompatibilityForConstrainedTypeParameters.ts]
|
|
function foo<T extends { bar: string }>() {
|
|
function bar<S extends T>() {
|
|
var x: S;
|
|
var y: T;
|
|
y = x;
|
|
}
|
|
}
|
|
|
|
//// [assignmentCompatibilityForConstrainedTypeParameters.js]
|
|
function foo() {
|
|
function bar() {
|
|
var x;
|
|
var y;
|
|
y = x;
|
|
}
|
|
}
|