Skip to content

Check Animated allowlist literals against supported key types - #60146

Merged
meta-codesync[bot] merged 3 commits into
react:mainfrom
rubennorte:export-D132934091
Nov 19, 2026
Merged

meta-codesync[bot] merged 3 commits into
react:mainfrom
rubennorte:export-D132934091

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:

Context

Annotating allowlist literals as arbitrary string dictionaries loses their exact keys and accepts spelling mistakes. These lists should be checked against the style, transform and interpolation type domains while preserving their inferred literal shapes.

Changes

  • Check color, style, transform and interpolation allowlists with satisfies and finite key domains derived from their source types, using as const to retain true literal values in both OSS and internal Flow.
  • Collect transform keys distributively across the transform union, preserving support for matrix and the four legacy transform-style keys.
  • Keep existing feature-flag gating and the public allowlist export type unchanged.
  • Preserve runtime output exactly; the constraints validate list entries, not completeness or native-backend support.

Flow configurations that check React Native implementation source need experimental.tslib_syntax=true for satisfies; React Native's validation configuration enables it.

Changelog: [Internal]

Differential Revision: D132934091

Summary:
## Context
React Native implementation type improvements use `satisfies` and signed-readonly mapped types. The open-source Flow checker needs an explicit opt-in before source files can adopt these features.

## Changes
- Enable `experimental.tslib_syntax=true` in the open-source Flow configuration.
- Keep the syntax opt-in separate from the implementation refactors that use it.

Changelog: [Internal]

Differential Revision: D133191436
Summary:
## Context
Style splitting builds fresh objects, while the listener registry allocates and deletes event slots. Using readonly API types for these mutable implementation objects requires unnecessary write suppressions. The listener registry is also sparse: event keys need not exist before registration.

## Changes
- Derive a mutable view-style builder with a mapped type that removes readonly, keeping readonly style inputs and returned API types.
- Make listener-registry slots mutable and optional while preserving readonly event argument tuples and registrations.
- Remove six obsolete suppressions for readonly writes and style-builder initialization.
- Preserve runtime code, null-prototype registry storage, and existing dynamic-key suppressions.

Flow configurations that check React Native implementation source need `experimental.tslib_syntax=true` for signed-readonly mapped types. The preceding configuration-only change provides that opt-in for React Native's OSS validation.

Changelog: [Internal]

Differential Revision: D132934090
Summary:
## Context
Annotating allowlist literals as arbitrary string dictionaries loses their exact keys and accepts spelling mistakes. These lists should be checked against the style, transform and interpolation type domains while preserving their inferred literal shapes.

## Changes
- Check color, style, transform and interpolation allowlists with satisfies and finite key domains derived from their source types, using as const to retain true literal values in both OSS and internal Flow.
- Collect transform keys distributively across the transform union, preserving support for matrix and the four legacy transform-style keys.
- Keep existing feature-flag gating and the public allowlist export type unchanged.
- Preserve runtime output exactly; the constraints validate list entries, not completeness or native-backend support.

Flow configurations that check React Native implementation source need `experimental.tslib_syntax=true` for satisfies; React Native's validation configuration enables it.

Changelog: [Internal]

Differential Revision: D132934091
@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 Nov 19, 2026
@meta-codesync

meta-codesync Bot commented Nov 19, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D132934091.

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit 57c9109 into react:main Nov 19, 2026
103 of 104 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in 57c9109

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 19, 2026
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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants