Skip to content

Conversation

@m-bert
Copy link
Contributor

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

Description

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

Test plan

yarn ts-check

@j-piasecki
Copy link
Member

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

@m-bert
Copy link
Contributor Author

m-bert commented Dec 8, 2025

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
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
Contributor 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.

3 participants