Files
react-native/packages/react-native-codegen
tarunrajput 202b965fed add emitObjectProp in parser primitives (#37872)
Summary:
Part of https://github.com/facebook/react-native/issues/34872
> Create a function emitObjectProp(name: string, optional: boolean) in parser-primitives.js. Factor out the code from [Flow](https://github.com/facebook/react-native/blob/d8ced6f8953cd896471983714e722caf50783960/packages/react-native-codegen/src/parsers/flow/components/events.js#L84-L93) and [TypeScript](https://github.com/facebook/react-native/blob/d8ced6f8953cd896471983714e722caf50783960/packages/react-native-codegen/src/parsers/typescript/components/events.js#L87-L96) into that function. Use that function in the original call site.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal][Changed]: Add emitObjectProp in parser primitives

Pull Request resolved: https://github.com/facebook/react-native/pull/37872

Test Plan:
```shell
yarn test react-native-codegen
```

Reviewed By: cipolleschi

Differential Revision: D46715634

Pulled By: rshest

fbshipit-source-id: 6c58002df132bc5b05a10a19f8611819d7179cb1
2023-06-14 11:53:02 -07:00
..
2022-02-22 02:23:02 -08:00
2020-09-29 14:39:40 -07:00

@react-native/codegen

Version

Installation

yarn add --dev @react-native/codegen

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

Testing

To run the tests in this package, run the following commands from the React Native root folder:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest packages/react-native-codegen.