2015-03-14 02:22:30 +01:00
|
|
|
=== tests/cases/compiler/typeParameterFixingWithConstraints.ts ===
|
|
|
|
interface IBar {
|
2015-04-16 01:44:20 +02:00
|
|
|
>IBar : IBar
|
2015-03-14 02:22:30 +01:00
|
|
|
|
|
|
|
[barId: string]: any;
|
2015-04-16 01:44:20 +02:00
|
|
|
>barId : string
|
2015-03-14 02:22:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface IFoo {
|
2015-04-16 01:44:20 +02:00
|
|
|
>IFoo : IFoo
|
2015-03-14 02:22:30 +01:00
|
|
|
|
|
|
|
foo<TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar): TBar;
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>IBar : IBar
|
|
|
|
>bar : TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>bar1 : (bar: TBar) => TBar
|
|
|
|
>bar : TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>bar2 : (bar: TBar) => TBar
|
|
|
|
>bar : TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>TBar : TBar
|
|
|
|
>TBar : TBar
|
2015-03-14 02:22:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
var foo: IFoo;
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : IFoo
|
|
|
|
>IFoo : IFoo
|
2015-03-14 02:22:30 +01:00
|
|
|
|
|
|
|
foo.foo({ bar: null }, bar => null, bar => null);
|
|
|
|
>foo.foo({ bar: null }, bar => null, bar => null) : IBar
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo.foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
|
|
|
|
>foo : IFoo
|
|
|
|
>foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
|
2015-03-14 02:22:30 +01:00
|
|
|
>{ bar: null } : { [x: string]: null; bar: null; }
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : null
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2015-03-14 02:22:30 +01:00
|
|
|
>bar => null : (bar: IBar) => any
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : IBar
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2015-03-14 02:22:30 +01:00
|
|
|
>bar => null : (bar: IBar) => any
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : IBar
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2015-03-14 02:22:30 +01:00
|
|
|
|