Skip to content
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

fix(fast_check): only range find arrow function signature #494

Conversation

dsherret
Copy link
Member

if let Some(return_type) = &n.return_type {
self.visit_ts_type_ann(return_type);
}
}
Copy link
Member

@lucacasonato lucacasonato May 30, 2024

Choose a reason for hiding this comment

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

We need to visit the body expression if it is not a block, and there is no return type. Test case:

type y = string;
export const x = () => ({} as y);

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Added a test under specs.

@dsherret dsherret requested a review from lucacasonato May 30, 2024 17:55
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret merged commit f243e75 into denoland:main May 30, 2024
16 checks passed
@dsherret dsherret deleted the fix_fast_check_only_range_find_arrow_func_signature branch May 30, 2024 18:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants