mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add support for UnsafeObject to allow using Flow strict in native modules
Summary: This new type will be valid in Flow strict mode and can be used by native modules and components to replace `Object`, with the same semantics. This unblocks the migration of the most modules in the React Native package to Flow strict. Changelog: [Internal] Add UnsafeObject type compatible with Flow strict mode to use in native modules and components Reviewed By: RSNara Differential Revision: D25540631 fbshipit-source-id: 60b80bbc84a53aecc747e3a1799cdf551e1859cd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
89beefaefb
commit
e088a4fe9c
+3
@@ -42,6 +42,9 @@ public abstract class NativeSampleTurboModuleSpec extends ReactContextBaseJavaMo
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public abstract WritableMap getObject(ReadableMap arg);
|
||||
|
||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||
public abstract WritableMap getUnsafeObject(ReadableMap arg);
|
||||
|
||||
@ReactMethod
|
||||
public abstract void voidFunc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user