/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCxxPlatform/react/devsupport/SourceCodeModule.h
37 строк
1010 B
Christoph Purrer
Add devsupport target to ReactCxxPlatform (#51902)
10 июн 2025, 09:15
10 июн 2025, 09:15
0e0cd39
Код
Авторство
О чём код?
/* * 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 <FBReactNativeSpec/FBReactNativeSpecJSI.h> #include <memory> #include <string> namespace facebook::react { class DevServerHelper; using SourceCodeConstants = NativeSourceCodeSourceCodeConstants<std::string>; template <> struct Bridging<SourceCodeConstants> : NativeSourceCodeSourceCodeConstantsBridging<SourceCodeConstants> {}; class SourceCodeModule : public NativeSourceCodeCxxSpec<SourceCodeModule> { public: explicit SourceCodeModule( std::shared_ptr<CallInvoker> jsInvoker, std::shared_ptr<DevServerHelper> devServerHelper = nullptr) : NativeSourceCodeCxxSpec(jsInvoker), devServerHelper_(devServerHelper) {} SourceCodeConstants getConstants(jsi::Runtime& rt); private: std::weak_ptr<DevServerHelper> devServerHelper_; }; } // namespace facebook::react