mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support emitting typed RCTDeviceEmitter events
Summary: This enables to code-gen base C++ types for custom exported JS types from a RN TM spec - which have been previously excluded from code-gen as these aren't used in any function. The only work around so far was to ‘register’ a random function using the custom type which should be used for RCTDeviceEventEmitter events Changelog: [Internal] Reviewed By: rshest Differential Revision: D56685903 fbshipit-source-id: add9ca40018b91c9fca98609ba3d1f85d3affec1
This commit is contained in:
1 parent
cfbee0b7ec
commit
c96c893374
9 files changed
+147
-12
No files matched your search
@@ -74,6 +74,12 @@ export type MenuItem = {
|
||||
items?: Array<MenuItem>,
|
||||
};
|
||||
|
||||
export type CustomDeviceEvent = {
|
||||
type: string,
|
||||
level: number,
|
||||
degree?: ?number,
|
||||
};
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+getArray: (arg: Array<ObjectStruct | null>) => Array<ObjectStruct | null>;
|
||||
+getBool: (arg: boolean) => boolean;
|
||||
|
||||
Reference in new issue
Block a user