Skip to content

ref: Make includeAllArgs mandatory in doEventsRequest() and iterate on types #87682

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

Merged
merged 5 commits into from
Mar 24, 2025

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Mar 22, 2025

doEventsRequest() previously allowed the prop includeAllArgs to be optional, and was typed based on whether that field was set to true or false | undefined.

Now the field is required, no longer optional.

I also made sure to be explicit about setting the generic, so TS doesn't have to infer it, in order to make all the callsites as explicit as possible. So you don't need to look at props or something to figure out what the return type will be.

The async test stuff seemed to improve some flakeyness I was seeing too.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 22, 2025
@ryan953 ryan953 marked this pull request as ready for review March 24, 2025 15:59
@ryan953 ryan953 requested review from a team as code owners March 24, 2025 15:59
@ryan953 ryan953 requested a review from a team March 24, 2025 17:57
@ryan953 ryan953 merged commit 7e60b62 into master Mar 24, 2025
41 checks passed
@ryan953 ryan953 deleted the ryan953/ref-doEventsRequest-type branch March 24, 2025 21:02
andrewshie-sentry pushed a commit that referenced this pull request Mar 27, 2025
…te on types (#87682)

`doEventsRequest()` previously allowed the prop `includeAllArgs` to be
optional, and was typed based on whether that field was set to `true` or
`false | undefined`.

Now the field is required, no longer optional.

I also made sure to be explicit about setting the generic, so TS doesn't
have to infer it, in order to make all the callsites as explicit as
possible. So you don't need to look at `props` or something to figure
out what the return type will be.

The async test stuff seemed to improve some flakeyness I was seeing too.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants