You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Java Turbo Module Event Emitter example (facebook#44906)
Summary:
Pull Request resolved: facebook#44906
Shows a proof of concept how '*strongly typed Turbo Module scoped*' `EventEmitters` can be used in a Java Turbo Module.
## Changelog:
[Android] [Added] - Add Java Turbo Module Event Emitter example
Reviewed By: javache
Differential Revision: D57530807
Copy file name to clipboardExpand all lines: packages/react-native-codegen/src/parsers/errors.js
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -100,15 +100,12 @@ class UnsupportedModuleEventEmitterPropertyParserError extends ParserError {
100
100
language: ParserType,
101
101
nullable: boolean,
102
102
untyped: boolean,
103
-
cxxOnly: boolean,
104
103
){
105
104
letmessage=`${language} interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's or non nullable 'EventEmitter's. Further the EventEmitter property `;
106
105
if(nullable){
107
106
message+=`'${propertyValue}' must non nullable.`;
108
107
}elseif(untyped){
109
108
message+=`'${propertyValue}' must have a concrete or void eventType.`;
110
-
}elseif(cxxOnly){
111
-
message+=`'${propertyValue}' is only supported in C++ Turbo Modules.`;
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/NativeSampleTurboModuleSpec.java
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,22 @@ public NativeSampleTurboModuleSpec(ReactApplicationContext reactContext) {
Copy file name to clipboardExpand all lines: packages/react-native/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp
0 commit comments