I compile the following code using the latest typescript compiler (1.4)
/// <reference path="typescript.d.ts" />
//import ts = require("typescript");
module cc {
console.log("Hello");
}
using the following compile args
node /TypeScript/built/local/tsc.js -m commonjs --noEmitOnError app.ts -out myApp.js
which compiles Ok and generates the "myApp.js" file.
When I uncomment the import line, I get no error on compiling, but it generates an empty (zero size) "myApp.js" and a file "app.js", even I have specified the --noEmitOnError switch.
This is a strip down example, in fact I specify multiple ".ts" files and I get no error on compiling, the empty "myApp.js" file and for each ".ts" file I specified, I get a ".js" file.
I am using node 0.10.30 on Windows 8.1
typescript.d.tsfile tosomethingelse.d.tsand try to import that instead? If it "works" by saying that it's not an external module, then you may have uncovered a bug that should be reported on GitHub.