From within a node app I would like to do:
var typeScript = require(\'typescript\');
typeScript.compile(\'...\')
I\'m looking to implemen
Currently it is not possible to achieve a compilation just by having a require and calling compile. If you can look at the harness.ts there is a compiler module that provides a rather simple way of doing it but I would suggest you to call tsc externally.
///
import exec = module('child_process');
var child = exec.exec('tsc foo.ts',
function (error, stdout, stderr) {
if (error !== null) {
console.log('exec error: ' + error);
}
});
I believe this would do the job.