After a recent post on StackOverflow, I thought I would repost here as I believe this is more of a feature request than a question about how to access a feature. Please see this thread for the responses and work-arounds (http://stackoverflow.com/questions/12717309/does-typescript-provide-an-explicit-public-api-for-nodejs-module-access)
or review the below or the original question reproduced in its entirety:
From within a node app I would like to do:
var typeScript = require('typescript');
I'm looking to implement the compiler into a build system but without access to a public API (typescript.compile, etc) this is impossible, or hacky.
Here's a more complete example of what I would like to do, though the below is for LiveScript, not TypeScript, utilitized in a plugin written for the Brunch.io build-system:
LiveScript = require 'LiveScript'
sysPath = require 'path'
module.exports = class LiveScriptCompiler
constructor: (@config) ->
compile: (data, path, callback) ->
result = LiveScript.compile data, bare: yes
error = err
callback error, result
(sysPath.join __dirname, '..', 'vendor', 'prelude-browser-0.6.0.js')
I believe something like this is very important for growing the language and its integration outside of the Visual Studio environment. Thoughts?