Conversation
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
huntie
reviewed
Aug 12, 2026
Boulea7
force-pushed
the
fix/react-native-strict-api-transform
branch
from
August 12, 2026 18:37
848cb39 to
6c27484
Compare
Boulea7
force-pushed
the
fix/react-native-strict-api-transform
branch
from
August 12, 2026 18:41
6c27484 to
66b3f45
Compare
This branch has not been deployed
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.
Summary:
Fixes #53899.
MergeUnionmade every transform key optional beforeMaximumOneOfselected a key. Indexing that optional mapped type addedundefinedto each element ofViewStyle['transform']under strict null checks. This makes the intermediate keys required, preserving the existing one-key transform constraint while keepingundefinedout of the array element type.Changelog:
[General] [Fixed] - Prevent strict transform array element types from including undefined
Test Plan:
Validated after merging
mainat024d5dafd530412efe43c9c2f95c9da109f48092:yarn build-typesandyarn build-types --validate— passed; the generated snapshot is up to date.yarn test-generated-typescriptandyarn test-typescript-legacy— passed._TransformStyle.js, plusgit diff --check— passed.The existing TypeScript suites use
strict: false, so the strict-null behavior was checked separately through the generated publicViewStyletype. The probe below fails on unmodified024d5dafwith TS2769 atObject.keys(element)and passes on this branch. Both runs rebuilt and resolved their own generated workspace types.After generating types, this command reproduces the check and removes its temporary file and directory:
Separate strict probes passed for single-key objects, readonly arrays, animated values, string transforms, an omitted transform, and the existing optional selected property. Negative probes confirmed rejection of undefined array elements and objects with multiple transform keys.
No additional test script or strict TypeScript configuration is included, as requested in review. The generator Jest suite, Flow check, full repository lint/Jest, native builds, and RNTester were not run for this update.
Codex was used for this update and its validation.