Split import into var and type to avoid breaking backword compatability of tsserverlibrary#16409
Conversation
…ty of tsserverlibrary
|
This works as a quick fix but I think this should be filed as a bug? namespace N {
export const enum E { A, B }
}
namespace M {
export import E = N.E;
}I think we should emit something inside We already do that in this case: export const enum E { A, B }b.ts export { E } from "./a"; |
Contributor
Author
|
we have treated we have overloaded that use in the services and the compiler. i wounder if what we need is a flag to inline regular enum values instead. |
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.
We switched
CommandNamesfrom a namespace to aconst enum. we have added animportalias declaration to cover that, but since it is aconst enum, the import will be elided from the .js file. in #16381 I have removed the const label, this now uncovers the fact thatCommandNamesdo not exisit in the generated JS.this change switches to use a type/var aliases to ensure it gets emitted in the .js file.
Fix #16393