support Array param for native component command in codegen (#41894)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41894

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D51866557

fbshipit-source-id: 595de8d49c0654b36d70a2c8872173fd6232a2be
This commit is contained in:
Zeya Peng
2023-12-12 18:48:47 -08:00
committed by Facebook GitHub Bot
parent d5114a4b9f
commit c848bf9545
11 changed files with 119 additions and 3 deletions
@@ -202,6 +202,8 @@ function getCommandArgJavaType(
return `args.getInt(${index})`;
case 'StringTypeAnnotation':
return `args.getString(${index})`;
case 'ArrayTypeAnnotation':
return `args.getArray(${index})`;
default:
(typeAnnotation.type: empty);
throw new Error(`Receieved invalid type: ${typeAnnotation.type}`);