Skip to content

Add centralized ReservedPrimitiveTypes registry and shared toSafeIdentifier helper#56049

Open
christophpurrer wants to merge 1 commit intofacebook:mainfrom
christophpurrer:export-D95711348
Open

Add centralized ReservedPrimitiveTypes registry and shared toSafeIdentifier helper#56049
christophpurrer wants to merge 1 commit intofacebook:mainfrom
christophpurrer:export-D95711348

Conversation

@christophpurrer
Copy link
Contributor

Summary:
Reduce duplication and inconsistency across codegen generators by centralizing reserved primitive type mappings into a single ReservedPrimitiveTypes.js registry, making future type support and fixes a single-source change and lowering bug risk.

Additionally, standardize identifier capitalization via a shared toSafeIdentifier helper in Utils.js to prevent divergent string handling across C++/Java helpers.

Also removes dead TODO comments and obsolete commented-out code from RNCodegen.js, GenerateModuleH.js, and parser files.

Changelog: [Internal]

Differential Revision: D95711348

…tifier helper

Summary:
Reduce duplication and inconsistency across codegen generators by centralizing reserved primitive type mappings into a single `ReservedPrimitiveTypes.js` registry, making future type support and fixes a single-source change and lowering bug risk.

Additionally, standardize identifier capitalization via a shared `toSafeIdentifier` helper in `Utils.js` to prevent divergent string handling across C++/Java helpers.

Also removes dead TODO comments and obsolete commented-out code from `RNCodegen.js`, `GenerateModuleH.js`, and parser files.

Changelog: [Internal]

Differential Revision: D95711348
@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 Mar 10, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 10, 2026

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

christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Mar 11, 2026
…tifier helper (facebook#56049)

Summary:

Reduce duplication and inconsistency across codegen generators by centralizing reserved primitive type mappings into a single `ReservedPrimitiveTypes.js` registry, making future type support and fixes a single-source change and lowering bug risk.

Additionally, standardize identifier capitalization via a shared `toSafeIdentifier` helper in `Utils.js` to prevent divergent string handling across C++/Java helpers.

Also removes dead TODO comments and obsolete commented-out code from `RNCodegen.js`, `GenerateModuleH.js`, and parser files.

Changelog: [Internal]

Differential Revision: D95711348
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. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants