110 lines
1.2 KiB
Plaintext
110 lines
1.2 KiB
Plaintext
|
=== tests/cases/compiler/letDeclarations-access.ts ===
|
||
|
|
||
|
let x = 0
|
||
|
>x : number
|
||
|
|
||
|
// No errors
|
||
|
|
||
|
x = 1;
|
||
|
>x = 1 : number
|
||
|
>x : number
|
||
|
|
||
|
x += 2;
|
||
|
>x += 2 : number
|
||
|
>x : number
|
||
|
|
||
|
x -= 3;
|
||
|
>x -= 3 : number
|
||
|
>x : number
|
||
|
|
||
|
x *= 4;
|
||
|
>x *= 4 : number
|
||
|
>x : number
|
||
|
|
||
|
x /= 5;
|
||
|
>x /= 5 : number
|
||
|
>x : number
|
||
|
|
||
|
x %= 6;
|
||
|
>x %= 6 : number
|
||
|
>x : number
|
||
|
|
||
|
x <<= 7;
|
||
|
>x <<= 7 : number
|
||
|
>x : number
|
||
|
|
||
|
x >>= 8;
|
||
|
>x >>= 8 : number
|
||
|
>x : number
|
||
|
|
||
|
x >>>= 9;
|
||
|
>x >>>= 9 : number
|
||
|
>x : number
|
||
|
|
||
|
x &= 10;
|
||
|
>x &= 10 : number
|
||
|
>x : number
|
||
|
|
||
|
x |= 11;
|
||
|
>x |= 11 : number
|
||
|
>x : number
|
||
|
|
||
|
x ^= 12;
|
||
|
>x ^= 12 : number
|
||
|
>x : number
|
||
|
|
||
|
x++;
|
||
|
>x++ : number
|
||
|
>x : number
|
||
|
|
||
|
x--;
|
||
|
>x-- : number
|
||
|
>x : number
|
||
|
|
||
|
++x;
|
||
|
>++x : number
|
||
|
>x : number
|
||
|
|
||
|
--x;
|
||
|
>--x : number
|
||
|
>x : number
|
||
|
|
||
|
var a = x + 1;
|
||
|
>a : number
|
||
|
>x + 1 : number
|
||
|
>x : number
|
||
|
|
||
|
function f(v: number) { }
|
||
|
>f : (v: number) => void
|
||
|
>v : number
|
||
|
|
||
|
f(x);
|
||
|
>f(x) : void
|
||
|
>f : (v: number) => void
|
||
|
>x : number
|
||
|
|
||
|
if (x) { }
|
||
|
>x : number
|
||
|
|
||
|
x;
|
||
|
>x : number
|
||
|
|
||
|
(x);
|
||
|
>(x) : number
|
||
|
>x : number
|
||
|
|
||
|
-x;
|
||
|
>-x : number
|
||
|
>x : number
|
||
|
|
||
|
+x;
|
||
|
>+x : number
|
||
|
>x : number
|
||
|
|
||
|
x.toString();
|
||
|
>x.toString() : string
|
||
|
>x.toString : (radix?: number) => string
|
||
|
>x : number
|
||
|
>toString : (radix?: number) => string
|
||
|
|