@@ -92,25 +92,20 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
92
92
throw UnsupportedOperationException (" Unimplemented method 'initialize'" )
93
93
}
94
94
95
- override fun getReactQueueConfiguration (): ReactQueueConfiguration {
96
- throw UnsupportedOperationException (" Unimplemented method 'getReactQueueConfiguration'" )
97
- }
95
+ override fun getReactQueueConfiguration (): ReactQueueConfiguration =
96
+ reactHost.reactQueueConfiguration!!
98
97
99
- override fun <T : JavaScriptModule > getJSModule (jsInterface : Class <T >): T {
100
- throw UnsupportedOperationException (" Unimplemented method 'getJSModule'" )
101
- }
98
+ override fun <T : JavaScriptModule > getJSModule (jsInterface : Class <T >): T =
99
+ reactHost.currentReactContext?.getJSModule(jsInterface)!!
102
100
103
- override fun <T : NativeModule > hasNativeModule (nativeModuleInterface : Class <T >): Boolean {
104
- throw UnsupportedOperationException (" Unimplemented method 'hasNativeModule'" )
105
- }
101
+ override fun <T : NativeModule > hasNativeModule (nativeModuleInterface : Class <T >): Boolean =
102
+ reactHost.hasNativeModule(nativeModuleInterface)
106
103
107
- override fun <T : NativeModule > getNativeModule (nativeModuleInterface : Class <T >): T ? {
108
- throw UnsupportedOperationException (" Unimplemented method 'getNativeModule'" )
109
- }
104
+ override fun <T : NativeModule > getNativeModule (nativeModuleInterface : Class <T >): T ? =
105
+ reactHost.getNativeModule(nativeModuleInterface)
110
106
111
- override fun getNativeModule (moduleName : String ): NativeModule ? {
112
- throw UnsupportedOperationException (" Unimplemented method 'getNativeModule'" )
113
- }
107
+ override fun getNativeModule (moduleName : String ): NativeModule ? =
108
+ reactHost.getNativeModule(moduleName)
114
109
115
110
@Deprecated(
116
111
message =
@@ -119,9 +114,7 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
119
114
throw UnsupportedOperationException (" Unimplemented method 'getJSIModule'" )
120
115
}
121
116
122
- override fun getNativeModules (): Collection <NativeModule > {
123
- throw UnsupportedOperationException (" Unimplemented method 'getNativeModules'" )
124
- }
117
+ override fun getNativeModules (): Collection <NativeModule > = reactHost.getNativeModules()
125
118
126
119
override fun extendNativeModules (modules : NativeModuleRegistry ) {
127
120
throw UnsupportedOperationException (" Unimplemented method 'extendNativeModules'" )
0 commit comments