-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
atomist-attic/rug-typescript-compiler
#16Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 2.3.0-dev.20170227
Code
const typescript = require("typescript");
const result = typescript.transpileModule(`let s:string = "string"`, {
compilerOptions: {
target: "es5",
module: typescript.ModuleKind.None // I don't need module!!
}
});
console.log(result.outputText)Expected behavior:
"use strict";
var s = "string";Actual behavior:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true }); // I cannot run this in browsers!!
var s = "string";I believe it's caused by #13709 that fixed #13709, but ModuleKind.None also uses CommonJS emit routine (module.ts#L14) so it's also affected.
Johnz86, iradul, zaggino, Maximaximum, martinhiller and 6 more
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug