Skip to content

Don’t error for missing await when promise is referenced in condition body - #43593

Merged
Andrew Branch (andrewbranch) merged 2 commits into
microsoft:masterfrom
andrewbranch:bug/43514
Apr 13, 2021
Merged

Don’t error for missing await when promise is referenced in condition body#43593
Andrew Branch (andrewbranch) merged 2 commits into
microsoft:masterfrom
andrewbranch:bug/43514

Conversation

@andrewbranch

Copy link
Copy Markdown
Member

Fixes#43514

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe now is a good time to reword the "always returns ... since it appears to" errors?

Comment threadsrc/compiler/checker.ts Outdated
@andrewbranch

Copy link
Copy Markdown
MemberAuthor

Daniel Rosenwasser (@DanielRosenwasser) are you alright with the error rewording?

@DanielRosenwasser

Copy link
Copy Markdown
Member

Andrew Branch (@andrewbranch) I'm a little hurt that you want to undo all my hard work, but it's probably okay.

@andrewbranch
Andrew Branch (andrewbranch) merged commit 06a7365 into microsoft:masterApr 13, 2021
@ejose19

Copy link
Copy Markdown

I think this broke original implementation, see playground (as in announcement). That exact code correctly errors out in beta playground.

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

Well, that’s not great 😱

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Milestone BugPRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent missing await in conditional errors, invalid quick fix

5 participants

@andrewbranch@DanielRosenwasser@ejose19@sandersn@typescript-bot