Skip to content

Fix strict transform array element type - #57908

Open
Boulea7 wants to merge 2 commits into
react:mainfrom
Boulea7:fix/react-native-strict-api-transform
Open

Fix strict transform array element type#57908
Boulea7 wants to merge 2 commits into
react:mainfrom
Boulea7:fix/react-native-strict-api-transform

Conversation

@Boulea7

@Boulea7 Boulea7 commented Aug 12, 2026

Copy link
Copy Markdown

Summary:

Fixes #53899.

MergeUnion made every transform key optional before MaximumOneOf selected a key. Indexing that optional mapped type added undefined to each element of ViewStyle['transform'] under strict null checks. This makes the intermediate keys required, preserving the existing one-key transform constraint while keeping undefined out of the array element type.

Changelog:

[General] [Fixed] - Prevent strict transform array element types from including undefined

Test Plan:

  • yarn test-generated-typescript
  • yarn test-typescript-legacy
  • yarn build-types --validate
  • yarn flow-check --max-workers 8 --show-all-errors (0 errors)
  • yarn lint
  • yarn test scripts/js-api --runInBand (22 suites, 153 tests passed)
  • Prettier and git diff --check

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2026
@github-actions

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 12, 2026
Comment thread package.json Outdated
@Boulea7
Boulea7 force-pushed the fix/react-native-strict-api-transform branch from 848cb39 to 6c27484 Compare August 12, 2026 18:37
@Boulea7
Boulea7 force-pushed the fix/react-native-strict-api-transform branch from 6c27484 to 66b3f45 Compare August 12, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TypeScript] react-native-strict-api transform can be undefined

2 participants