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:
Christoph Purrer
2024-06-14 10:36:31 -07:00
committed by Facebook GitHub Bot
parent 358fe46969
commit 810a516475
16 changed files with 108 additions and 117 deletions
@@ -445,12 +445,8 @@ module.exports = {
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
Object.keys(nativeModules).forEach(hasteModuleName => {
const {
aliasMap,
excludedPlatforms,
moduleName,
spec: {properties},
} = nativeModules[hasteModuleName];
const {aliasMap, excludedPlatforms, moduleName, spec} =
nativeModules[hasteModuleName];
if (excludedPlatforms != null && excludedPlatforms.includes('android')) {
return;
}
@@ -467,7 +463,7 @@ module.exports = {
'javax.annotation.Nonnull',
]);
const methods = properties.map(method => {
const methods = spec.methods.map(method => {
if (method.name === 'getConstants') {
return buildGetConstantsMethod(method, imports, resolveAlias);
}