Fix return type for Bridging::fromJs (#56246)

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

Fixes return type to receive correct generic types.

Before:
```
static std::pair<T1, T1>
  fromJs(facebook::jsi::Runtime &rt, const jsi::Array &array, const std::shared_ptr<CallInvoker> &jsInvoker)
```

After:
```
static std::pair<T1, T2>
  fromJs(facebook::jsi::Runtime &rt, const jsi::Array &array, const std::shared_ptr<CallInvoker> &jsInvoker)
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D98292820

fbshipit-source-id: bb7791ace2391240dd50ece55b2a2ce905a51115
This commit is contained in:
Dawid Małecki authored and meta-codesync[bot] committed 2026-03-31 08:32:57 -07:00
1 parent d920d109cf
commit 9bc2050a79
7 files changed
+7 -7

No files matched your search

@@ -76,7 +76,7 @@ struct Bridging<std::array<T, N>> : array_detail::BridgingStatic<std::array<T, N
template <typename T1, typename T2>
struct Bridging<std::pair<T1, T2>> : array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
static std::pair<T1, T1>
static std::pair<T1, T2>
fromJs(facebook::jsi::Runtime &rt, const jsi::Array &array, const std::shared_ptr<CallInvoker> &jsInvoker)
{
return std::make_pair(
@@ -10417,7 +10417,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>
@@ -10244,7 +10244,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>
@@ -12875,7 +12875,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>
@@ -12702,7 +12702,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>
@@ -7180,7 +7180,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>
@@ -7171,7 +7171,7 @@ struct facebook::react::Bridging<std::function<R(Args...)>> {
template <typename T1, typename T2>
struct facebook::react::Bridging<std::pair<T1, T2>> : public facebook::react::array_detail::BridgingStatic<std::pair<T1, T2>, 2> {
public static std::pair<T1, T1> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
public static std::pair<T1, T2> fromJs(facebook::jsi::Runtime& rt, const facebook::jsi::Array& array, const std::shared_ptr<facebook::react::CallInvoker>& jsInvoker);
}
template <typename T, size_t N>