Exporting tsc.js for plugins

Topics: General, Language Specification
Jan 27, 2013 at 7:52 AM

I and probably many others who enjoy developing plugins for Node.js based on tsc compiler would like to see some exports in tsc.js.

The most general seem to be:

- export batch compiler
- export input d & d.ts files (also those which are referenced)
- e
xport outputted js files
- silent exit (conditional this.ioHost.quit(1)

That way the tsc.js could be used in many ways and currently I have to patch up some code in tsc.js (added & removed a few lines, its really simple) for every TypeScript release which is quite annoying.

General idea:

//var batch = new BatchCompiler(IO);
exports.compile = function (args) {
    input = [];
    output = [];
    IO.arguments = args;
    var batch = new BatchCompiler(IO);
    return { err: compiler.errorReporter.hasErrors, input: input, output: output };