Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Support single-module transpilation mode #2499
The compiler does not do emit based on semantic information in most cases. this allows us to provide an api for transpiling a module that does not require typecheck or full program information. just single file syntactic transformation.
A new compiler flag (--singeFileTranspilation or --disableFullProgramOptimizations for instance) that will make cases that break single file-transpilation an error namely: 1.Const enums defined in ambient modules and 2.Re-exporting types-only constructs when targeting ES6
Proposed implementation #2550.
referenced this issue
Apr 10, 2015
Visual Studio Code does not transpile on save. And I suppose it's because TSC does not implement this. It's major pain to transpile and compile all files each time, it causes a lot of file changes and triggers many webpack/browserify processes, time from edit to F5 is really big.
Only tool doing single file transpiling at the moment is atom-typescript, but it's not using TSC for that.
Btw, it probably should be called "--singleModuleTranspile" because single file transpile is not same thing, if I understod this right.