-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix: No more adding infinite boolean for function returning promise #1481
Conversation
return await navigateByUrl(""); | ||
} | ||
|
||
async function navigateTo2(): Promise<boolean> | boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note,
async function navigateTo(): Promise<boolean> | boolean {
andasync function navigateTo2(): Promise<boolean> | boolean {
are wrong. Both should return onlyPromise<boolean>
. I can remove those from the test but I wanted to keep them to see, the difference.
Yeah that looks like an existing unrelated issue. Up for a followup? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that looks like an existing unrelated issue. Up for a followup?
Yeah. I think I have now understood that many of the issues that I'm seeing, are coming from the root cause that TypeStat does not understand that it should be adding more types to inside Promise.
@@ -6,6 +6,8 @@ import { setSubtract } from "../../shared/sets.js"; | |||
const knownTypeFlagEquivalents = new Map([ | |||
[ts.TypeFlags.BigInt, ts.TypeFlags.BigIntLiteral], | |||
[ts.TypeFlags.BigIntLiteral, ts.TypeFlags.BigInt], | |||
[ts.TypeFlags.Boolean, ts.TypeFlags.BooleanLiteral], | |||
[ts.TypeFlags.BooleanLiteral, ts.TypeFlags.Boolean], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was this small change in the end??
😄 a lot of these little bugs are! Nice find though, this is a really good fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@all-contributors please add @rubiesonthesky for code.
|
@rubiesonthesky already contributed before to code I couldn't determine any contributions to add, did you specify any contributions? |
PR Checklist
status: accepting prs
Overview
It was this small change in the end??
Note,
async function navigateTo(): Promise<boolean> | boolean {
andasync function navigateTo2(): Promise<boolean> | boolean {
are wrong. Both should return onlyPromise<boolean>
. I can remove those from the test but I wanted to keep them to see, the difference.