Fix array brackets appearing in the wrong place in the snapshot (#56214)

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

Changelog: [Internal]

Snapshot generator was putting `[]` in wrong place when generating array type - it was adding it to the type name instead of the variable name. This diff addresses that.

Reviewed By: cipolleschi

Differential Revision: D98102328

fbshipit-source-id: c5b1f290da3c94ad4834a9756d849ae879733033
This commit is contained in:
Jakub Piasecki authored and meta-codesync[bot] committed 2026-03-26 08:40:54 -07:00
1 parent e59957137a
commit cc9d06bef7
3 files changed
+21

No files matched your search

+2
View File
@@ -333,6 +333,8 @@ def get_doxygen_params(
+ param_array
)
param_name = None
elif param_name:
param_name += param_array
else:
param_type += param_array
@@ -0,0 +1,3 @@
void test::arrayParam(const char name[]);
void test::arrayParamSized(int values[10]);
void test::arrayParamUnnamed(const char[]);
@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
namespace test {
void arrayParam(const char name[]);
void arrayParamSized(int values[10]);
void arrayParamUnnamed(const char[]);
} // namespace test