TypeScript/tests/baselines/reference/genericInterfaceFunctionTypeParameter.types
2015-04-13 14:29:37 -07:00

22 lines
1.1 KiB
Plaintext

=== tests/cases/compiler/genericInterfaceFunctionTypeParameter.ts ===
export interface IFoo<A> { }
>IFoo : IFoo<A>, Symbol(IFoo, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 0))
>A : A, Symbol(A, Decl(genericInterfaceFunctionTypeParameter.ts, 0, 22))
export function foo<A>(fn: (ifoo: IFoo<A>) => void) {
>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))
foo(fn); // Invocation is necessary to repro (!)
>foo(fn) : void
>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))
}