Skip to content

Add support for basic unions for native modules#46747

Closed
elicwhite wants to merge 1 commit into
facebook:mainfrom
elicwhite:export-D63664505
Closed

Add support for basic unions for native modules#46747
elicwhite wants to merge 1 commit into
facebook:mainfrom
elicwhite:export-D63664505

Conversation

@elicwhite
Copy link
Copy Markdown
Member

Summary:
You can now use unions in native modules.

Support for this pretty much existed, but one callsite was throwing for non-cpp modules which meant nobody could use this.

Previously, StructCollector would throw that this was not supported because it couldn't generate it for objc. Instead of generating something smart in the native code for each option, it just tells native to treat them like the base type (number, string, object).

Changelog: [General][Added] Codegen now supports Union Types in NativeModules

Differential Revision: D63664505

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Oct 1, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D63664505

Summary:

You can now use unions in native modules.

Support for this pretty much existed, but one callsite was throwing for non-cpp modules which meant nobody could use this.

Previously, StructCollector would throw that this was not supported because it couldn't generate it for objc. Instead of generating something smart in the native code for each option, it just tells native to treat them like the base type (number, string, object).

Changelog: [General][Added] Codegen now supports Union Types in NativeModules

Reviewed By: GijsWeterings

Differential Revision: D63664505
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D63664505

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 3af126b.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 4, 2024
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @elicwhite in 3af126b

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

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 Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants