TypeScript/tests/baselines/reference/typeParameterConstrainedToOuterTypeParameter2.types

39 lines
552 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/typeParameterConstrainedToOuterTypeParameter2.ts ===
interface A<T> {
>A : A<T>
>T : T
2014-08-15 23:33:16 +02:00
foo<U extends T>(x: A<A<U>>)
>foo : <U extends T>(x: A<A<U>>) => any
>U : U
>T : T
>x : A<A<U>>
>A : A<T>
>A : A<T>
>U : U
2014-08-15 23:33:16 +02:00
}
interface B<T> {
>B : B<T>
>T : T
2014-08-15 23:33:16 +02:00
foo<U extends T>(x: B<B<U>>)
>foo : <U extends T>(x: B<B<U>>) => any
>U : U
>T : T
>x : B<B<U>>
>B : B<T>
>B : B<T>
>U : U
2014-08-15 23:33:16 +02:00
}
var a: A<string>
>a : A<string>
>A : A<T>
2014-08-15 23:33:16 +02:00
var b: B<string> = a;
>b : B<string>
>B : B<T>
>a : A<string>
2014-08-15 23:33:16 +02:00