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
@@ -171,6 +171,8 @@ function getCommandArgJavaType(param: NamedShape<CommandParamTypeAnnotation>) {
return 'int';
case 'StringTypeAnnotation':
return 'String';
case 'ArrayTypeAnnotation':
return 'ReadableArray';
default:
(typeAnnotation.type: empty);
throw new Error('Receieved invalid typeAnnotation');