mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
//// [tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts] ////
|
|
|
|
=== declFileObjectLiteralWithOnlySetter.ts ===
|
|
function /*1*/makePoint(x: number) {
|
|
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0))
|
|
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 24))
|
|
|
|
return {
|
|
b: 10,
|
|
>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 12))
|
|
|
|
set x(a: number) { this.b = a; }
|
|
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 14))
|
|
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
|
>this.b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 12))
|
|
>this : Symbol(__object, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 10))
|
|
>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 12))
|
|
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
|
|
|
};
|
|
};
|
|
var /*3*/point = makePoint(2);
|
|
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 6, 3))
|
|
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0))
|
|
|
|
point./*2*/x = 30;
|
|
>point./*2*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 14))
|
|
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 6, 3))
|
|
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 14))
|
|
|