TypeScript/tests/baselines/reference/typeParameterFixingWithConstraints.types

48 lines
1.3 KiB
Plaintext
Raw Normal View History

2015-03-14 02:22:30 +01:00
=== tests/cases/compiler/typeParameterFixingWithConstraints.ts ===
interface IBar {
>IBar : IBar
2015-03-14 02:22:30 +01:00
[barId: string]: any;
>barId : string
2015-03-14 02:22:30 +01:00
}
interface IFoo {
>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;
>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;
>foo : IFoo
>IFoo : IFoo
2015-03-14 02:22:30 +01:00
foo.foo({ bar: null }, bar => null, bar => null);
2015-07-03 00:21:09 +02:00
>foo.foo({ bar: null }, bar => null, bar => null) : { [x: string]: any; bar: any; }
>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; }
>bar : null
2015-04-13 21:36:11 +02:00
>null : null
2015-07-03 00:21:09 +02:00
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
>bar : { [x: string]: any; bar: any; }
2015-04-13 21:36:11 +02:00
>null : null
2015-07-03 00:21:09 +02:00
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
>bar : { [x: string]: any; bar: any; }
2015-04-13 21:36:11 +02:00
>null : null
2015-03-14 02:22:30 +01:00