Skip to content

Change runCallback types - #3860

Merged
m-bert merged 4 commits into
nextfrom
@mbert/change-run-callback-type
Dec 16, 2025
Merged

m-bert merged 4 commits into
nextfrom
@mbert/change-run-callback-type

Conversation

@m-bert

@m-bert m-bert commented Dec 2, 2025 •

Copy link
Copy Markdown
Collaborator

Description

This PR removes ...unknown[] from runCallback function, as in V3 it is always boolean.

Test plan

yarn ts-check

@j-piasecki

Copy link
Copy Markdown
Member

Won't this break if we decide to bring the state manager back in its original form?

@m-bert

m-bert commented Dec 8, 2025 •

Copy link
Copy Markdown
Collaborator Author

Won't this break if we decide to bring the state manager back in its original form?

It will, we will decide what to do with this PR on the next meeting. I've left that opened for the time being.

@j-piasecki

Copy link
Copy Markdown
Member

I think we can go with that as-is, since state manager will change, no?

}

if (didSucceed === undefined) {
(handler as SingleParameterCallback<typeof event>)(event);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I know that theoretically we have two possibilities - GestureEventCallbackand GestureTouchEventCallback. However, since those calls will differ only by cast, the resulting JS will look like this:

if(...) {
  handler(event)
} else {
  handler(event)
}

So I don't think it makes sense to keep them separated.

@m-bert
m-bert requested a review from j-piasecki December 15, 2025 10:21
@m-bert
m-bert merged commit ba7a96b into next Dec 16, 2025
2 checks passed
@m-bert
m-bert deleted the @mbert/change-run-callback-type branch December 16, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants