Skip to content

Conversation

@gabrieldonadel
Copy link
Collaborator

Summary

This PR adds a functionTypeAnnotation function to the codegen Parser class and implements it in the Flow and TypeScript parsers as requested on #34872, refactoring the throwIfModuleTypeIsUnsupported function to accept a Parser instead of a ParserType and use the newly created function instead of the if (language) logic.

Changelog

[Internal] [Added] - Add functionTypeAnnotation to codegen Parser class

Test Plan

Run yarn jest react-native-codegen and ensure CI is green

image

@facebook-github-bot facebook-github-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 14, 2023
@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Mar 14, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,519,172 +0
android hermes armeabi-v7a 7,834,700 +0
android hermes x86 8,999,506 +0
android hermes x86_64 8,854,758 +0
android jsc arm64-v8a 9,142,474 +0
android jsc armeabi-v7a 8,333,842 +0
android jsc x86 9,197,229 +0
android jsc x86_64 9,455,335 +0

Base commit: 803bb16
Branch: main

@facebook-github-bot
Copy link
Contributor

@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 15, 2023
@facebook-github-bot
Copy link
Contributor

@rshest merged this pull request in 43986e8.

@gabrieldonadel gabrieldonadel deleted the chore/codegen-define-functionTypeAnnotation branch March 15, 2023 13:12
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
…6468)

Summary:
This PR adds a  `functionTypeAnnotation`  function to the codegen Parser class and implements it in the Flow and TypeScript parsers as requested on facebook#34872, refactoring the `throwIfModuleTypeIsUnsupported`  function to accept a `Parser` instead of a `ParserType` and use the newly created function instead of the `if (language)` logic.

## Changelog

[Internal] [Added] - Add `functionTypeAnnotation` to codegen Parser class

Pull Request resolved: facebook#36468

Test Plan:
Run `yarn jest react-native-codegen` and ensure CI is green

![image](https://user-images.githubusercontent.com/11707729/224882017-2c31f326-047d-4c21-91e0-3396203ce1c5.png)

Reviewed By: cipolleschi

Differential Revision: D44056853

Pulled By: rshest

fbshipit-source-id: f22b9efe53df16f7916eb1a9cea8b9531f1194f5
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. Type: Enhancement A new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants