Fix strict transform array element type #57908
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.47) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 311 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #57908"
general
weight: 0.35
Boulea7
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.