Files
react-native/packages/react-native/ReactCxxPlatform/react/nativemodule/TurboModuleManager.h
T
Andrew Datsenko 5bf54bc1f8 Add support for multiple TurboModule providers (#50707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50707

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72968663

fbshipit-source-id: 87026d0a774b3b44980095c31f6df697717951ff
2025-04-15 10:14:07 -07:00

35 lines
973 B
C++

/*
* 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
#include "JavaScriptModule.h"
#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/TurboModule.h>
#include <functional>
#include <string>
#include <vector>
namespace facebook::react {
class RuntimeScheduler;
using TurboModuleManagerDelegate = std::function<std::shared_ptr<TurboModule>(
const std::string& name,
const std::shared_ptr<CallInvoker>& jsInvoker)>;
using TurboModuleManagerDelegates = std::vector<TurboModuleManagerDelegate>;
using LegacyModuleProviderDelegate =
std::function<TurboModuleProviderFunctionType(
const std::shared_ptr<CallInvoker>& jsInvoker,
const std::shared_ptr<RuntimeScheduler>& runtimeScheduler,
const JavaScriptModuleCallback& javaScriptModuleCallback)>;
} // namespace facebook::react