Skip to content

Label dictionary keys in react-native (#59818) - #59818

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D130071787
Nov 6, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D130071787

Conversation

@SamChou19815

@SamChou19815 SamChou19815 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary:

Labels unlabeled dictionary keys: {[string]: T} becomes {[key: string]: T}. In TypeScript, {[string]: T} is a computed property, not an index signature, so this prepares the code for experimental.require_dictionary_key_label, which requires the label. The label is documentation only and does not change any type.

Generated by the flow/nameIndexerKeys codemod, run only on the keys that the flag reports, so computed keys like {['a']: T} are left alone. Keys inside comment types, and files whose formatting the codemod's printer would change, were labeled with a plain text insertion instead.

Changelog: [Internal]

Differential Revision: D130071787

@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 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Nov 6, 2026
@meta-codesync

meta-codesync Bot commented Nov 6, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Nov 6, 2026

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

meta-codesync Bot pushed a commit that referenced this pull request Nov 6, 2026
Summary:
Pull Request resolved: #59818

Labels unlabeled dictionary keys: `{[string]: T}` becomes `{[key: string]: T}`. In TypeScript, `{[string]: T}` is a computed property, not an index signature, so this prepares the code for `experimental.require_dictionary_key_label`, which requires the label. The label is documentation only and does not change any type.

Generated by the `flow/nameIndexerKeys` codemod, run only on the keys that the flag reports, so computed keys like `{['a']: T}` are left alone. Keys inside comment types, and files whose formatting the codemod's printer would change, were labeled with a plain text insertion instead.

Changelog: [Internal]

Differential Revision: D130071787
@meta-codesync meta-codesync Bot changed the title Label dictionary keys in react-native Label dictionary keys in react-native (#59818) Nov 6, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in 24c0c7f

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 6, 2026
Summary:
Pull Request resolved: #59818

Labels unlabeled dictionary keys: `{[string]: T}` becomes `{[key: string]: T}`. In TypeScript, `{[string]: T}` is a computed property, not an index signature, so this prepares the code for `experimental.require_dictionary_key_label`, which requires the label. The label is documentation only and does not change any type.

Generated by the `flow/nameIndexerKeys` codemod, run only on the keys that the flag reports, so computed keys like `{['a']: T}` are left alone. Keys inside comment types, and files whose formatting the codemod's printer would change, were labeled with a plain text insertion instead.

Changelog: [Internal]

Differential Revision: D130071787
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in 50fd5aa

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

@meta-codesync
meta-codesync Bot merged commit de05579 into main Nov 6, 2026
92 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in de05579

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

@SamChou19815
SamChou19815 deleted the export-D130071787 branch November 6, 2026 16:38
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.

2 participants