123 lines
1.4 KiB
Text
123 lines
1.4 KiB
Text
=== tests/cases/compiler/letDeclarations-access.ts ===
|
|
|
|
let x = 0
|
|
>x : number
|
|
>0 : number
|
|
|
|
// No errors
|
|
|
|
x = 1;
|
|
>x = 1 : number
|
|
>x : number
|
|
>1 : number
|
|
|
|
x += 2;
|
|
>x += 2 : number
|
|
>x : number
|
|
>2 : number
|
|
|
|
x -= 3;
|
|
>x -= 3 : number
|
|
>x : number
|
|
>3 : number
|
|
|
|
x *= 4;
|
|
>x *= 4 : number
|
|
>x : number
|
|
>4 : number
|
|
|
|
x /= 5;
|
|
>x /= 5 : number
|
|
>x : number
|
|
>5 : number
|
|
|
|
x %= 6;
|
|
>x %= 6 : number
|
|
>x : number
|
|
>6 : number
|
|
|
|
x <<= 7;
|
|
>x <<= 7 : number
|
|
>x : number
|
|
>7 : number
|
|
|
|
x >>= 8;
|
|
>x >>= 8 : number
|
|
>x : number
|
|
>8 : number
|
|
|
|
x >>>= 9;
|
|
>x >>>= 9 : number
|
|
>x : number
|
|
>9 : number
|
|
|
|
x &= 10;
|
|
>x &= 10 : number
|
|
>x : number
|
|
>10 : number
|
|
|
|
x |= 11;
|
|
>x |= 11 : number
|
|
>x : number
|
|
>11 : number
|
|
|
|
x ^= 12;
|
|
>x ^= 12 : number
|
|
>x : number
|
|
>12 : 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
|
|
>1 : 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
|
|
|