TurboModule: exclude NativeSampleTurboModule in the schema

Summary:
The sample module is meant for demo only, but it lives alongside other core modules in react-native repo.

For now, exclude it in the Flow-type parsing, just like `NativeUIManager.js`

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24005108

fbshipit-source-id: 9ef524bfe2778dd983c94d1701f9ce49da5e0a68
This commit is contained in:
Kevin Gozali 2020-09-29 18:38:24 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 94b198cfd5
Коммит 1d89ef87b6
2 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -32,6 +32,9 @@ fileList.forEach(file => {
// NativeUIManager will be deprecated by Fabric UIManager.
// For now, ignore this spec completely because the types are not fully supported.
!f.endsWith('NativeUIManager.js') &&
// NativeSampleTurboModule is for demo purpose. It should be added manually to the
// app for now.
!f.endsWith('NativeSampleTurboModule.js') &&
!f.includes('__tests'),
);
allFiles.push(...dirFiles);

Просмотреть файл

@ -9,8 +9,7 @@
#include <PackagesRnTesterAndroidAppSpec.h>
#include <ReactAndroidSpec.h>
// TODO: Remove SampleTurboModule from ReactAndroidSpec, then uncomment.
// #include <ReactCommon/SampleTurboModuleSpec.h>
#include <ReactCommon/SampleTurboModuleSpec.h>
namespace facebook {
namespace react {
@ -21,11 +20,10 @@ std::shared_ptr<TurboModule> RNTesterAppModuleProvider(const std::string moduleN
return module;
}
// TODO: Remove SampleTurboModule from ReactAndroidSpec, then uncomment.
// module = SampleTurboModuleSpec_ModuleProvider(moduleName, params);
// if (module != nullptr) {
// return module;
// }
module = SampleTurboModuleSpec_ModuleProvider(moduleName, params);
if (module != nullptr) {
return module;
}
// TODO: fix up the ReactAndroidSpec_ModuleProvider() to avoid the Android prefix.
if (moduleName == "DatePicker") {