Forward declare TurboModule in TurboModuleProvider (#54577)

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

Forward-declare so these headers can be parsed in targets which disable exceptions.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D87333893

fbshipit-source-id: e161b89f4cfadcefcfe5966eb7f21036829635a9
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2025-11-18 08:27:08 -08:00
1 parent 0ee4a2d01a
commit 5a3759e9ff
2 files changed
+5 -4

No files matched your search

@@ -95,7 +95,7 @@ ReactInstance::ReactInstance(
jsErrorHandler->handleError(jsiRuntime, originalError, true);
} catch (std::exception& ex) {
jsi::JSError error(
jsiRuntime, std::string("Non-js exception: ") + ex.what());
jsiRuntime, std::string("Non-JS exception: ") + ex.what());
jsErrorHandler->handleError(jsiRuntime, error, true);
}
});
@@ -7,15 +7,16 @@
#pragma once
#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/TurboModule.h>
#include <functional>
#include <memory>
#include <string>
#include <vector>
namespace facebook::react {
class CallInvoker;
class TurboModule;
using TurboModuleProvider =
std::function<std::shared_ptr<TurboModule>(const std::string &name, const std::shared_ptr<CallInvoker> &jsInvoker)>;