Files
react-native/packages/react-native-codegen
Ramanpreet Nara 688caa0bdc Introduce ObjectTypeAnnotation utility type
Summary:
All throughout the Codegen schema, we re-declare the following shape:
```
{
  type: 'ObjectTypeAnnotation',
  properties: $ReadOnlyArray<{
    name: string,
    optional: boolean,
    typeAnnotation: ...
  }>
}
```

This diff introduces an `ObjectTypeAnnotation<T>` utility type and replaces those re-declarations with instantiations of this type.

**Motivation:** To reduce noise in the CodegenSchema. This should be a pure refactor, and shouldn't actually change any behaviour.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D24707963

fbshipit-source-id: 6b4eb711ddd041f3a041109ade5ad5644fb16924
2020-11-05 18:30:08 -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