mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
705 B
Plaintext
27 lines
705 B
Plaintext
//// [tests/cases/compiler/assignToFn.ts] ////
|
|
|
|
=== assignToFn.ts ===
|
|
namespace M {
|
|
>M : Symbol(M, Decl(assignToFn.ts, 0, 0))
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(assignToFn.ts, 0, 13))
|
|
|
|
f(n:number):boolean;
|
|
>f : Symbol(I.f, Decl(assignToFn.ts, 1, 17))
|
|
>n : Symbol(n, Decl(assignToFn.ts, 2, 3))
|
|
}
|
|
|
|
var x:I={ f:function(n) { return true; } };
|
|
>x : Symbol(x, Decl(assignToFn.ts, 5, 7))
|
|
>I : Symbol(I, Decl(assignToFn.ts, 0, 13))
|
|
>f : Symbol(f, Decl(assignToFn.ts, 5, 13))
|
|
>n : Symbol(n, Decl(assignToFn.ts, 5, 25))
|
|
|
|
x.f="hello";
|
|
>x.f : Symbol(I.f, Decl(assignToFn.ts, 1, 17))
|
|
>x : Symbol(x, Decl(assignToFn.ts, 5, 7))
|
|
>f : Symbol(I.f, Decl(assignToFn.ts, 1, 17))
|
|
}
|
|
|