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:
Rubén Norte
2021-01-04 03:56:57 -08:00
committed by Facebook GitHub Bot
parent 89beefaefb
commit e088a4fe9c
14 changed files with 125 additions and 1 deletions
@@ -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();