Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example on how to use union types on TM #36927

Closed
wants to merge 1 commit into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
This change is an alternative to show how to use union types in TM without generating union types natively.

The goal is to enable using unions in the JS layer, without compromising the Native typesafety.

If this approach is a good middle-ground, we can remove the MixedTypeAnnotation and migrate to this approach.

Changelog:

[General][Added] - Add example on Union types for Turbomodules

Differential Revision: D45045552

Summary:
This change is an alternative to show how to use union types in TM **without generating union types** natively.

The goal is to enable using unions in the JS layer, without compromising the Native typesafety.

If this approach is a good middle-ground, we can remove the MixedTypeAnnotation and migrate to this approach.

## Changelog:
[General][Added] - Add example on Union types for Turbomodules

Differential Revision: D45045552

fbshipit-source-id: 101e7036d83485e3b31802c2156d1e6dd6af9a64
@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 fb-exported labels Apr 17, 2023
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,624,502 +3,715
android hermes armeabi-v7a 7,937,235 +3,769
android hermes x86 9,110,624 +3,831
android hermes x86_64 8,965,365 +3,770
android jsc arm64-v8a 9,190,190 +3,347
android jsc armeabi-v7a 8,380,527 +3,391
android jsc x86 9,247,898 +3,453
android jsc x86_64 9,506,324 +3,408

Base commit: 2b4e1f5
Branch: main

@cortinico
Copy link
Contributor

Closing as abandoned internally

@cortinico cortinico closed this Aug 7, 2023
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 p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants