2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/anonterface.ts ===
|
|
|
|
module M {
|
2014-08-28 21:40:58 +02:00
|
|
|
>M : typeof M
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export class C {
|
|
|
|
>C : C
|
|
|
|
|
|
|
|
m(fn:{ (n:number):string; },n2:number):string {
|
|
|
|
>m : (fn: (n: number) => string, n2: number) => string
|
|
|
|
>fn : (n: number) => string
|
|
|
|
>n : number
|
|
|
|
>n2 : number
|
|
|
|
|
|
|
|
return fn(n2);
|
|
|
|
>fn(n2) : string
|
|
|
|
>fn : (n: number) => string
|
|
|
|
>n2 : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var c=new M.C();
|
2014-08-25 19:36:12 +02:00
|
|
|
>c : M.C
|
|
|
|
>new M.C() : M.C
|
|
|
|
>M.C : typeof M.C
|
2014-08-15 23:33:16 +02:00
|
|
|
>M : typeof M
|
2014-08-25 19:36:12 +02:00
|
|
|
>C : typeof M.C
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
c.m(function(n) { return "hello: "+n; },18);
|
|
|
|
>c.m(function(n) { return "hello: "+n; },18) : string
|
|
|
|
>c.m : (fn: (n: number) => string, n2: number) => string
|
2014-08-25 19:36:12 +02:00
|
|
|
>c : M.C
|
2014-08-15 23:33:16 +02:00
|
|
|
>m : (fn: (n: number) => string, n2: number) => string
|
|
|
|
>function(n) { return "hello: "+n; } : (n: number) => string
|
|
|
|
>n : number
|
|
|
|
>"hello: "+n : string
|
|
|
|
>n : number
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|