SIGN IN SIGN UP

Remove the `@ts-ignore TODO` from the event pipeline in `jestUtils` (#4460)

## Description

`fireGestureHandler` reused a single `let _` variable for every stage of
the event pipeline, so its type was fixed by the first assignment as
`EventWithoutStates[]`. The final `_.map(wrapWithNativeEvent)` step
didn't type-check against it, which was suppressed with `// @ts-ignore
TODO` followed by an `as unknown as` double cast.

This PR collapses the last two steps into a single map with one honest
cast (by that point the pipeline has filled in `state` and `oldState`),
the same pattern the file already uses in the other
`wrapWithNativeEvent` call sites. Also replaces `events.shift()!` with
destructuring, which removes a `no-non-null-assertion` lint warning.

No behavior change.

## Test plan

- `yarn ts-check` passes without the suppression
- `yarn test` — 18 suites, 156 tests pass, including calls to
`fireGestureHandler` with an empty event list (the only edge where
`shift()` could differ)
M
Michał Bert committed
592d95180958adc8e391a64b7c3b25bc836d61c9
Parent: d064b66
Committed by GitHub <noreply@github.com> on 8/21/2026, 6:30:31 AM