-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude enum/number compatibility rule from comparable relation #42472
Conversation
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at fd1a4cb. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at fd1a4cb. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at fd1a4cb. You can monitor the build here. |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
The only test changes related to this PR are some new errors in the RWC vscode project. All but one of them are flagging real issues. For example, code that declares something as a The one undesired new error is related to this enum declaration in vs/editor/common/modes.ts: /**
* Open ended enum at runtime
* @internal
*/
export const enum LanguageId {
Null = 0,
PlainText = 1
} The intent here is for export const enum LanguageId {
Null = +0,
PlainText = 1
} Subtle, but actually an intended and documented behavior. |
This seems like almost pure goodness, but I would still err on the side of saying that this can wait for 4.3. That |
What is the case for the non-union enum? It's unclear from that example. |
Let me know if https://github.com/microsoft/TypeScript/wiki/Breaking-Changes#union-enums-cannot-be-compared-to-any-number accurately reflects the change here. |
The code that broke compares a value of type |
Yes, looks good. |
Fixes #42442.