mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Call Turbo Module methods 'methods' in the Turbo Module JSON schema (#44919)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44919 ## Changelog: [Internal] [Fixed] - Call Turbo Module methods 'methods' in the Turbo Module JSON schema We don't support `properties` on Turbo Modules. We only support methods (even eventEmitters are just methods) Reviewed By: javache Differential Revision: D58510557 fbshipit-source-id: 02b1dc93a37b58b47bb9fd94a9658b5a7301bf55
This commit is contained in:
committed by
Facebook GitHub Bot
parent
358fe46969
commit
810a516475
+4
-7
@@ -142,11 +142,8 @@ module.exports = {
|
||||
|
||||
const hasteModuleNames: Array<string> = Object.keys(nativeModules).sort();
|
||||
for (const hasteModuleName of hasteModuleNames) {
|
||||
const {
|
||||
aliasMap,
|
||||
excludedPlatforms,
|
||||
spec: {properties},
|
||||
} = nativeModules[hasteModuleName];
|
||||
const {aliasMap, excludedPlatforms, spec} =
|
||||
nativeModules[hasteModuleName];
|
||||
if (excludedPlatforms != null && excludedPlatforms.includes('iOS')) {
|
||||
continue;
|
||||
}
|
||||
@@ -169,10 +166,10 @@ module.exports = {
|
||||
* Note: As we serialize NativeModule methods, we insert structs into
|
||||
* StructCollector, as we encounter them.
|
||||
*/
|
||||
properties
|
||||
spec.methods
|
||||
.filter(property => property.name !== 'getConstants')
|
||||
.forEach(serializeProperty);
|
||||
properties
|
||||
spec.methods
|
||||
.filter(property => property.name === 'getConstants')
|
||||
.forEach(serializeProperty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user