TypeScript/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint3.types
2015-04-15 16:44:20 -07:00

92 lines
1.3 KiB
Plaintext

=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/typeParameterUsedAsTypeParameterConstraint3.ts ===
// Type parameters are in scope in their own and other type parameter lists
// Object types
//class C<T, U extends T, V extends U> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T {
// var r: T;
// return x;
// }
//}
//class C2<V extends U, T, U extends T> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T {
// var r: T;
// return x;
// }
//}
interface I<T, U, V> {
>I : I<T, U, V>
>T : T
>U : U
>V : V
x: T;
>x : T
>T : T
y: U;
>y : U
>U : U
z: V;
>z : V
>V : V
foo<W extends V>(x: W): T;
>foo : <W extends V>(x: W) => T
>W : W
>V : V
>x : W
>W : W
>T : T
}
interface I2<V, T, U> {
>I2 : I2<V, T, U>
>V : V
>T : T
>U : U
x: T;
>x : T
>T : T
y: U;
>y : U
>U : U
z: V;
>z : V
>V : V
foo<W extends V>(x: W): T;
>foo : <W extends V>(x: W) => T
>W : W
>V : V
>x : W
>W : W
>T : T
}
//interface I < T, U extends T, V extends U > {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}
//interface I2<V extends U, T, U extends T> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}