fix: don't assume react-native ViewProps declares onFocusCapture, gate check:types in CI - #118
Merged
Merged
Conversation
RuudBurger
force-pushed
the
fix/view-focus-capture-optional-rn-prop
branch
from
August 17, 2026 13:20
0832128 to
cb9dd2c
Compare
DouweBos
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging #117 left
mainfailingcheck:types, which blocks the release job: the changesets action can't pushchangeset-release/mainbecause the husky pre-push hook runscheck:typesand it exits 2. No version PR got created and nothing published.The cause:
View'sCombinedPropsreadsRNViewProps['onFocusCapture']. react-native-tvos declares that prop onViewProps(Libraries/Types/CoreEventTypes.d.ts), plain react-native doesn't. The change was written and typechecked against the Plex client, which aliasesreact-nativetoreact-native-tvos, so it compiled there and not here.Reads the prop only when it's present. Generic, so the indexed access stays deferred (a non-generic conditional doesn't narrow it and fails with
TS2538instead):Both forks typecheck, and consumers on tvos keep the handler type they had.
Second commit closes the hole that let this through: PR CI ran
lint+testbut notcheck:types, so a type error couldn't fail a PR — it only surfaced later as a failed push inside the release job, reading as a git error rather than a type error.check:typesnow runs on pull requests, and this PR is the first run to exercise it (13/13 packages, ~23s).Verified against a real install of this repo, not just in the abstract:
check:types13/13,lint0 errors,test728 passing across 62 files.