-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(optim/fix): only emit type declarations once
- every other emission is just a duplicate -- no need to spend compute time to make duplicates - even for the upcoming multi-entry, the same types are emitted for each entry as the compiler just emits types for everything in the `tsconfig` `include` - fixes a long-standing bug with the deprecated moveTypes() function that would occassionally cause types to not be properly output - this was actually due to moveTypes() being run multiple times in parallel (as well as the types themselves being emitted multiple times in parallel) - hence the EEXIST and ENOENT filesystem errors being thrown, as that directory was being changed multiple times in parallel - race conditions, fun! - now they're only emitted once and only moved once, so no problems! - also fixes a bug with an initial version of multi-entry where if an entry in a subdir of src/ were added, e.g. src/foo/bar, the entire tree of type declarations would get output into dist/foo/src/*.d.ts - alternatively, could call `moveTypes()` with an arg for each entry, but there's no need since all declarations get produced the first time around anyway - similar bug occurred with an initial version of `--preserveModules` that used separate format directories
- Loading branch information
Showing
4 changed files
with
16 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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