[iOS] Remove a stale TODO in `State.ts` and the unused constants export (#4457)
## Description Removes two leftovers that reference each other: - The `TODO use State from RNModule` comment in `src/State.ts`, added in the TS rewrite (#1327). The idea was to source the `State` object from the native module's exported constants instead of duplicating the values in JS. That's no longer viable: the TurboModule spec has no `getConstants`, web and Jest have no native module to ask, and `as const` literal types have to exist at compile time anyway. - The `constantsToExport` method in `RNGestureHandlerModule.mm` (the `State` and `Direction` dictionaries, exported since 2017) together with the now-unused `RNGestureHandlerDirection.h` import. Nothing on the JS side reads these - without `getConstants` in the spec they are unreachable on the new architecture. `requiresMainQueueSetup` stays, as module initialization inserts into the static `_managers` map that component views read on the main thread. No behavior change. ## Test plan - Built and ran `basic-example` on the iOS simulator; the app renders and a tap on the `VirtualGestureDetector` text logs `Tapped on first part!`. - Verified nothing references the exported constants: no `getConstants` in `NativeRNGestureHandlerModule.ts`, no `Module.State` / `Module.Direction` reads in `src/`.
M
Michał Bert committed
0a5b6724c3853aec732a79037e4f96f5f48ef8c6
Parent: bac9b38
Committed by GitHub <noreply@github.com>
on 8/20/2026, 10:24:33 AM