1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
//// [tests/cases/compiler/constDeclarations-access5.ts] ////
//// [constDeclarations_access_1.ts]
export const x = 0;
//// [constDeclarations_access_2.ts]
///<reference path='constDeclarations_access_1.ts'/>
import m = require('constDeclarations_access_1');
// Errors
m.x = 1;
m.x += 2;
m.x -= 3;
m.x *= 4;
m.x /= 5;
m.x %= 6;
m.x <<= 7;
m.x >>= 8;
m.x >>>= 9;
m.x &= 10;
m.x |= 11;
m.x ^= 12;
m
m.x++;
m.x--;
++m.x;
--m.x;
++((m.x));
m["x"] = 0;
// OK
var a = m.x + 1;
function f(v: number) { }
f(m.x);
if (m.x) { }
m.x;
(m.x);
-m.x;
+m.x;
m.x.toString();
//// [constDeclarations_access_1.js]
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.x = 0;
});
//// [constDeclarations_access_2.js]
define(["require", "exports", "constDeclarations_access_1"], function (require, exports, m) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Errors
m.x = 1;
m.x += 2;
m.x -= 3;
m.x *= 4;
m.x /= 5;
m.x %= 6;
m.x <<= 7;
m.x >>= 8;
m.x >>>= 9;
m.x &= 10;
m.x |= 11;
m.x ^= 12;
m;
m.x++;
m.x--;
++m.x;
--m.x;
++((m.x));
m["x"] = 0;
// OK
var a = m.x + 1;
function f(v) { }
f(m.x);
if (m.x) { }
m.x;
(m.x);
-m.x;
+m.x;
m.x.toString();
});
|