mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix type of constantsToExport arg (#54718)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54718 The cast in `constantsToExport` is unnecessary if we actually use the right type here, without the `Builder` suffix. Not a breaking change, since Objective-C seemingly doesn't enforce these parameter constraints. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D87980865 fbshipit-source-id: c9052e219fdf44d012583fcaa94b10b7c189b510
This commit is contained in:
1 parent
c400b88ebf
commit
2abbd47d1b
8 files changed
+39
-43
No files matched your search
Vendored
+1
-1
@@ -513,7 +513,7 @@ function serializeConstantsProtocolMethods(
|
||||
"Unable to generate C++ struct from module's getConstants() method return type.",
|
||||
);
|
||||
|
||||
const returnObjCType = `facebook::react::ModuleConstants<JS::${hasteModuleName}::Constants::Builder>`;
|
||||
const returnObjCType = `facebook::react::ModuleConstants<JS::${hasteModuleName}::Constants>`;
|
||||
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
return ['constantsToExport', 'getConstants'].map<MethodSerializationOutput>(
|
||||
|
||||
+2
-2
@@ -1055,8 +1055,8 @@ namespace JS {
|
||||
- (NSString *)getEnums:(double)enumInt
|
||||
enumFloat:(double)enumFloat
|
||||
enumString:(NSString *)enumString;
|
||||
- (facebook::react::ModuleConstants<JS::NativeSampleTurboModule::Constants::Builder>)constantsToExport;
|
||||
- (facebook::react::ModuleConstants<JS::NativeSampleTurboModule::Constants::Builder>)getConstants;
|
||||
- (facebook::react::ModuleConstants<JS::NativeSampleTurboModule::Constants>)constantsToExport;
|
||||
- (facebook::react::ModuleConstants<JS::NativeSampleTurboModule::Constants>)getConstants;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in new issue
Block a user