1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
=== tests/cases/compiler/typeArgInference2WithError.ts ===
interface Item {
>Item : Symbol(Item, Decl(typeArgInference2WithError.ts, 0, 0))
name: string;
>name : Symbol(Item.name, Decl(typeArgInference2WithError.ts, 0, 16))
}
declare function foo<T extends Item>(x?: T, y?: T): T;
>foo : Symbol(foo, Decl(typeArgInference2WithError.ts, 2, 1))
>T : Symbol(T, Decl(typeArgInference2WithError.ts, 4, 21))
>Item : Symbol(Item, Decl(typeArgInference2WithError.ts, 0, 0))
>x : Symbol(x, Decl(typeArgInference2WithError.ts, 4, 37))
>T : Symbol(T, Decl(typeArgInference2WithError.ts, 4, 21))
>y : Symbol(y, Decl(typeArgInference2WithError.ts, 4, 43))
>T : Symbol(T, Decl(typeArgInference2WithError.ts, 4, 21))
>T : Symbol(T, Decl(typeArgInference2WithError.ts, 4, 21))
var z7 = foo("abc", 5); // Error
>z7 : Symbol(z7, Decl(typeArgInference2WithError.ts, 6, 3))
>foo : Symbol(foo, Decl(typeArgInference2WithError.ts, 2, 1))
|