Relax import/export elision rules for separate compilation#2550
Merged
Relax import/export elision rules for separate compilation#2550
Conversation
src/services/services.ts
Outdated
Contributor
|
looks good. We just need a unit test. |
Contributor
|
thanks! 👍 |
vladima
added a commit
that referenced
this pull request
Mar 31, 2015
Relax import/export elision rules for separate compilation
6 tasks
|
I just tried Visual Studio Code, it can't emit single files on save. Is this required for it to be able to do it? The Atom-Typescript can do it on save, which is a huge plus, but it doesn't use TSC for that. Edit Just noticed this is "merged", somehow I saw this as open. |
Contributor
|
Compile on save is not supported yet. I would recommend starting the compiler with --watch; this should give you the same effect. Also I wopd recommend using tsconfig with this setting to get consistent experience between the ide and command line and run the compiler from the folder with tsconfig.json as:
Also pinging @jrieken from vs code to comment on compile on save. |
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new compiler option: separateCompilation that should be used when we compile one file at a time. In this mode when some name is not resolved (and thus is
unknownSymbol) we conservatively assume that this name can possibly refer to a value and do not elide imports/exportes that use this name.Also I've added
transpilefunction that can be used i.e. from es6-module-loader to get the emit result for one file