Skip to content

add support for getEmitOutput #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
clausreinke opened this issue Jan 29, 2015 · 1 comment
Open

add support for getEmitOutput #43

clausreinke opened this issue Jan 29, 2015 · 1 comment

Comments

@clausreinke
Copy link
Owner

moved from #39, suggested by @Phaiax:

Hey.
I just looked at the last example here:
https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API

The LanguageService Object has a function called getEmitOutput. One could use the already parsed code tree to compile (hopefully) faster.
This would need a new command for tss.js and the ability to configure the CompilerOptions via tss.js. (settings source maps, ecma target, ...).

I've looked at the TypeScript source and at your changes and I think I could even implement it by myself, if you think this is a good idea and you do not want to do the work.

What do you think?

@clausreinke
Copy link
Owner Author

Adding support for single-file getEmitOutput itself should be simple, but adding full tsc project functionality to typescript-tools would be more involved, and more than I'm willing to commit to at this point (needs to be supported later, not just implemented once; also, running the compiler once I'm happy with the code hasn't been a problem for me, so far - I usually want to run tests right after, so I need a separate build setup anyway, and the compile itself hasn't been a time blocker).

I've thought about adding emit support from time to time, to check how advanced features are compiled to JS, or to see whether comments make it through as expected. Mostly, it has been made redundant by TS progress/bug fixes, but if others think it will be more than a curiosity, I'll add it.

Configuration support is a different matter, and something I will definitely need to address - after TSv1.4 support is live and fixed. I'll open a separate ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant