/* * 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 #include #include #include namespace facebook::react { std::unordered_map< std::string, std::function< std::shared_ptr(std::shared_ptr jsInvoker)>>& globalExportedCxxTurboModuleMap(); /** * Registers the given C++ TurboModule initializer function * in the global module map. * This needs to be called before the TurboModule is requested from JS, * for example in a `+ load`, your AppDelegate's start, or from Java init. */ void registerCxxModuleToGlobalModuleMap( std::string name, std::function( std::shared_ptr jsInvoker)> moduleProviderFunc); } // namespace facebook::react