mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
34 lines
497 B
TypeScript
34 lines
497 B
TypeScript
var value;
|
|
|
|
// identifiers: variable and parameter
|
|
var x1: number;
|
|
x1 *= value;
|
|
x1 += value;
|
|
|
|
function fn1(x2: number) {
|
|
x2 *= value;
|
|
x2 += value;
|
|
}
|
|
|
|
// property accesses
|
|
var x3: { a: number };
|
|
x3.a *= value;
|
|
x3.a += value;
|
|
|
|
x3['a'] *= value;
|
|
x3['a'] += value;
|
|
|
|
// parentheses, the contained expression is reference
|
|
(x1) *= value;
|
|
(x1) += value;
|
|
|
|
function fn2(x4: number) {
|
|
(x4) *= value;
|
|
(x4) += value;
|
|
}
|
|
|
|
(x3.a) *= value;
|
|
(x3.a) += value;
|
|
|
|
(x3['a']) *= value;
|
|
(x3['a']) += value; |