Closed
Conversation
Collaborator
|
Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary |
Collaborator
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Member
|
Can you open a bug for this instead? |
Member
|
To help with PR housekeeping, I'm going to close this PR while it's still waiting on a bug to be created. |
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.
I'm curious what the impact would be on the TS codebase, of inlining "our own" regular enums, i.e. all enums except those from other packages?
That's what I've done in the first commit. We could then, optionally:
--preserveConstEnumsoption (all const enums having been rewritten, regular enums are preserved anyway)That's what I've done in the second commit --- or we could omit that change if there's some remaining distinction/advantage to const enums, apart from inlining?
To inline all "our own" enums, I changed the inlining condition as follows:
i.e. inline enums if:
The advantage of inlining "our own" regular enums is that you have the option of avoiding const enums, which prevent project references from being built with
--isolatedModules. That's because project references use .d.ts files,--declarationturns non-ambient const enums into ambient const enums, and ambient const enums are incompatible with single-file transpilation (--isolatedModules).