react-native-macos/packages/eslint-plugin-specs
Christoph Purrer b444f0e44e react-native-code-gen Add Enum Type support for C++ TurboModules
Summary:
There are cases where we want to pass an enum type into a TurboModule method which is handy to restrict certain arguments to a restricted set of values, e.g. restricting quality to ```enum Quality { SD, HD, }```

Approach:
- We are not generating an ```enum``` type in C++ but rather just cast type safe to the corresponding member type.

- We don't support mixed enum types at this time, e.g. ```export enum StringOption { One = 'one', Two = 2, Three = 'three', };``` will not work. See: https://www.typescriptlang.org/docs/handbook/enums.html#heterogeneous-enums

- We only support untyped (default to String), String, and Number enum properties

This is for C++ only, Java and ObjC are not supported atm.

Changelog:
[General][Added] - react-native-code-gen Add Enum Type support for C++ TurboModules

Reviewed By: RSNara

Differential Revision: D38880963

fbshipit-source-id: f2399b29948306bc555429b6f96c43ea4c39c46e
2022-08-30 00:48:06 -07:00
..
__tests__ fix(eslint-config): switch to new babel parser (#34020) 2022-06-21 21:04:42 -07:00
with-babel-register Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
BUCK Rename eslint-plugin-codegen to eslint-plugin-specs (#32698) 2021-12-02 20:47:12 -08:00
index.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
package.json Update flow-parser for react-native-codegen and eslint-plugin-spec 2022-08-18 11:32:01 -07:00
postpack.js Add postpack hook that undoes prepack 2022-07-29 03:56:23 -07:00
prepack.js fix npm lifecycle hook (#34273) 2022-07-26 06:47:51 -07:00
react-native-modules.js react-native-code-gen Add Enum Type support for C++ TurboModules 2022-08-30 00:48:06 -07:00