-
Notifications
You must be signed in to change notification settings - Fork 12.8k
False-positive void-return in dtslint after adding awaited #37551
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Sorry, it seems like a |
We don't support this kind of back compat |
@RyanCavanaugh I hear you. But what if we could support it? TypeScript/src/compiler/types.ts Lines 124 to 127 in a1c8608
export const enum SyntaxKind {
Unknown = "Unknown",
EndOfFileToken = "EndOfFileToken",
SingleLineCommentTrivia = "SingleLineCommentTrivia", Kind of like it was did in TypeScript/src/compiler/types.ts Lines 4207 to 4210 in a1c8608
Another approach is to do this like for different flags TypeScript/src/compiler/types.ts Lines 4163 to 4166 in a1c8608
export const enum SyntaxKind {
Unknown = 1 << 0,
EndOfFileToken = 2 << 0,
SingleLineCommentTrivia = 3 << 0, or even simpler: export const enum SyntaxKind {
Unknown = 0,
EndOfFileToken = 1,
SingleLineCommentTrivia = 2, Any of these approaches will preserve enum values and make TS even more back compat :) What do you think? |
@rbuckton what do you think about #37551 (comment) ? |
TypeScript Version: from 3.9.0-dev.20200321 to 3.9.0-dev.20200324
Code
Expected behavior:
dtslint
uses rulevoid-return
which didn't fail for the above code and shouldn't fail.Actual behavior:
When
dtslint
is paired withtypescript
version since this commit: e3ec7b1 which was merged in #35998 - it fails:Related to Maxim-Mazurok/google-api-typings-generator#101
The text was updated successfully, but these errors were encountered: