TypeScript/tests/baselines/reference/inheritedGenericCallSignature.types

52 lines
1.8 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/inheritedGenericCallSignature.ts ===
interface I1<T> {
2015-04-13 23:01:57 +02:00
>I1 : I1<T>, Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
2014-08-15 23:33:16 +02:00
(a: T): T;
2015-04-13 23:01:57 +02:00
>a : T, Symbol(a, Decl(inheritedGenericCallSignature.ts, 3, 5))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 1, 13))
2014-08-15 23:33:16 +02:00
}
interface Object {}
2015-04-13 23:01:57 +02:00
>Object : Object, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11), Decl(inheritedGenericCallSignature.ts, 5, 1))
2014-08-15 23:33:16 +02:00
interface I2<T> extends I1<T[]> {
2015-04-13 23:01:57 +02:00
>I2 : I2<T>, Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
>I1 : I1<T>, Symbol(I1, Decl(inheritedGenericCallSignature.ts, 0, 0))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
2014-08-15 23:33:16 +02:00
b: T;
2015-04-13 23:01:57 +02:00
>b : T, Symbol(b, Decl(inheritedGenericCallSignature.ts, 12, 33))
>T : T, Symbol(T, Decl(inheritedGenericCallSignature.ts, 12, 13))
2014-08-15 23:33:16 +02:00
}
var x: I2<Date>;
2015-04-13 23:01:57 +02:00
>x : I2<Date>, Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>I2 : I2<T>, Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
var y = x(undefined);
2015-04-13 23:01:57 +02:00
>y : Date[], Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
2014-08-15 23:33:16 +02:00
>x(undefined) : Date[]
2015-04-13 23:01:57 +02:00
>x : I2<Date>, Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3))
>undefined : undefined, Symbol(undefined)
2014-08-15 23:33:16 +02:00
y.length; // should not error
2015-04-13 23:01:57 +02:00
>y.length : number, Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
>y : Date[], Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3))
>length : number, Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
2014-08-15 23:33:16 +02:00