TypeScript/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types

22 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/genericInterfaceFunctionTypeParameter.ts ===
export interface IFoo<A> { }
2015-04-13 23:01:57 +02:00
>IFoo : IFoo<A>, Symbol(IFoo, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 0))
>A : A, Symbol(A, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 22))
2014-08-15 23:33:16 +02:00
export function foo<A>(fn: (ifoo: IFoo<A>) => void) {
2015-04-13 23:01:57 +02:00
>foo : <A>(fn: (ifoo: IFoo<A>) => void) => void, Symbol(foo, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 28))
>A : A, Symbol(A, Decl(genericInterfaceFunctionTypeParameter.ts, 1, 20))
>fn : (ifoo: IFoo<A>) => void, Symbol(fn, Decl(genericInterfaceFunctionTypeParameter.ts, 1, 23))
>ifoo : IFoo<A>, Symbol(ifoo, Decl(genericInterfaceFunctionTypeParameter.ts, 1, 28))
>IFoo : IFoo<A>, Symbol(IFoo, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 0))
>A : A, Symbol(A, Decl(genericInterfaceFunctionTypeParameter.ts, 1, 20))
2014-08-15 23:33:16 +02:00
foo(fn); // Invocation is necessary to repro (!)
>foo(fn) : void
2015-04-13 23:01:57 +02:00
>foo : <A>(fn: (ifoo: IFoo<A>) => void) => void, Symbol(foo, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 28))
>fn : (ifoo: IFoo<A>) => void, Symbol(fn, Decl(genericInterfaceFunctionTypeParameter.ts, 1, 23))
2014-08-15 23:33:16 +02:00
}