mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deprecate old JSI module APIs (#42085)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42085 Deprecating the old JSI module APIs: `getJSIModule(JSIModuleType moduleType)`, `addJSIModules(List<JSIModuleSpec> jsiModules)` and `setTurboModuleManager(JSIModule getter)` to further delete them in future release. Deprecating them as of now to cater the OSS use-cases Changelog: [Internal] internal Reviewed By: christophpurrer Differential Revision: D50927292 fbshipit-source-id: 1d25f9f28b8aaf34979a90e4792317b263ae1714
This commit is contained in:
committed by
Facebook GitHub Bot
parent
655b12dbfa
commit
e2fb88e6fd
+7
-5
@@ -71,6 +71,9 @@ public interface CatalystInstance
|
||||
@Nullable
|
||||
NativeModule getNativeModule(String moduleName);
|
||||
|
||||
@Deprecated(
|
||||
since =
|
||||
"getJSIModule(JSIModuleType moduleType) is deprecated and will be deleted in the future. Please use ReactInstanceEventListener to subscribe for react instance events instead.")
|
||||
JSIModule getJSIModule(JSIModuleType moduleType);
|
||||
|
||||
Collection<NativeModule> getNativeModules();
|
||||
@@ -116,6 +119,7 @@ public interface CatalystInstance
|
||||
|
||||
RuntimeScheduler getRuntimeScheduler();
|
||||
|
||||
@Deprecated
|
||||
void addJSIModules(List<JSIModuleSpec> jsiModules);
|
||||
|
||||
/**
|
||||
@@ -130,11 +134,9 @@ public interface CatalystInstance
|
||||
*/
|
||||
NativeMethodCallInvokerHolder getNativeMethodCallInvokerHolder();
|
||||
|
||||
/**
|
||||
* For the time being, we want code relying on the old infra to also work with TurboModules.
|
||||
* Hence, we must provide the TurboModuleRegistry to CatalystInstance so that getNativeModule,
|
||||
* hasNativeModule, and getNativeModules can also return TurboModules.
|
||||
*/
|
||||
@Deprecated(
|
||||
since =
|
||||
"setTurboModuleManager(JSIModule getter) is deprecated and will be deleted in the future. Please use setTurboModuleRegistry(TurboModuleRegistry turboModuleRegistry)instead.")
|
||||
void setTurboModuleManager(JSIModule getter);
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
|
||||
Reference in New Issue
Block a user