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
Improve @nullable annotions in Java TurboModule codegen
Summary:
Noticed these types could be improved based on the tests added in D40979066 (e81c98c).
Changelog: [Android][Fixed] Corrected Nullable annotations for parameters and return values in TurboModules codegen
Reviewed By: mdvacca, cipolleschi
Differential Revision: D40979940
fbshipit-source-id: cfc352a9e7eb9f59e2cce3d7da110a9a8d32db4b
Copy file name to clipboardExpand all lines: packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJavaSpec-test.js.snap
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ public abstract class NativeSampleTurboModuleSpec extends ReactContextBaseJavaMo
78
78
79
79
@ReactMethod
80
80
@DoNotStrip
81
-
public void optionalMethod(ReadableMapoptions, Callbackcallback, ReadableArrayextras) {}
81
+
public void optionalMethod(ReadableMapoptions, Callbackcallback, @NullableReadableArrayextras) {}
82
82
83
83
@ReactMethod
84
84
@DoNotStrip
@@ -379,7 +379,7 @@ public abstract class NativeSampleTurboModuleSpec extends ReactContextBaseJavaMo
379
379
380
380
@ReactMethod
381
381
@DoNotStrip
382
-
public abstract void getValueWithOptionalArg(ReadableMap parameter, Promise promise);
382
+
public abstract void getValueWithOptionalArg(@Nullable ReadableMap parameter, Promise promise);
0 commit comments