fix(compiler): For FatalDiagnosticError, hide the message field without affecting the emit#55160
Closed
dylhunn wants to merge 1 commit intoangular:mainfrom
Closed
fix(compiler): For FatalDiagnosticError, hide the message field without affecting the emit#55160dylhunn wants to merge 1 commit intoangular:mainfrom
FatalDiagnosticError, hide the message field without affecting the emit#55160dylhunn wants to merge 1 commit intoangular:mainfrom
Conversation
90c1e67 to
63c32b5
Compare
FatalDiagnosticError, inherit the field in the constructorFatalDiagnosticError, hide the message field without affecting the emit
…ithout affecting the emit We want to hide `.message` from users, but the previous approach is not compatible with a specific [TS 3.7 flag](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier) ("using class fields to specialize properties from base classes also won’t work"). I received a request from the TS team to fix this, so they can enable that flag. Instead, we just override `message` to `never` in the .d.ts using `declare`.
63c32b5 to
e0c936f
Compare
devversion
approved these changes
Apr 2, 2024
Member
devversion
left a comment
There was a problem hiding this comment.
lgtm— which shows again that we need tests in 1P/3P, if we are trying to roll this out
Contributor
|
This PR was merged into the repository by commit f824911. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 want to hide
.messagefrom users, but the previous approach is not compatible with a specific TS 3.7 flag ("using class fields to specialize properties from base classes also won’t work"). I received a request from the g3 TS team to fix this, so they can enable that flag.Instead, we just override
messagetoneverin the .d.ts usingdeclare.