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
|
//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] ////
//// [foo1.ts]
var x = 10;
export = typeof x; // Ok
//// [foo2.ts]
export = "sausages"; // Ok
//// [foo3.ts]
export = class Foo3 {}; // Error, not an expression
//// [foo4.ts]
export = true; // Ok
//// [foo5.ts]
export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript
//// [foo6.ts]
export = void; // Error, void operator requires an argument
//// [foo7.ts]
export = Date || String; // Ok
//// [foo8.ts]
export = null; // Ok
//// [foo1.js]
"use strict";
var x = 10;
module.exports = typeof x;
//// [foo2.js]
"use strict";
module.exports = "sausages";
//// [foo3.js]
"use strict";
module.exports = /** @class */ (function () {
function Foo3() {
}
return Foo3;
}());
//// [foo4.js]
"use strict";
module.exports = true;
//// [foo5.js]
"use strict";
module.exports = undefined;
//// [foo6.js]
"use strict";
module.exports = void ;
//// [foo7.js]
"use strict";
module.exports = Date || String;
//// [foo8.js]
"use strict";
module.exports = null;
|