mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Drop RCT_EXPORT_METHOD from RCTI18nManager TurboModule (#57685)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57685 Changelog: [Internal] `RCTI18nManager` is a TurboModule: it conforms to `NativeI18nManagerSpec` and implements `getTurboModule:` returning the codegen'd `...SpecJSI`. For TurboModules, the JS->ObjC dispatch is driven by codegen (the generated spec supplies the `selector` and argument kinds, invoked at runtime via `NSMethodSignature` / `NSInvocation`), not by the `RCT_EXPORT_METHOD` macro's `__rct_export__` metadata. The exported methods here are async-void with concrete parameter types (no generic `id` requiring `RCTConvert` coercion), so the macro is not functionally required. Convert them to plain ObjC method declarations; conformance to the codegen'd `NativeI18nManagerSpec` protocol keeps compiler-enforced signature parity. Signature-only refactor with no change to the JS-facing API. Sync methods, methods with `id` params, and `constantsToExport` are intentionally left untouched. Reviewed By: cortinico Differential Revision: D113579882 fbshipit-source-id: 132391150a623562cb6c6247d89da34f77ed4434
This commit is contained in:
1 parent
a27d495b7c
commit
051702f336
1 file changed
+3
-3
@@ -26,17 +26,17 @@ RCT_EXPORT_MODULE()
|
||||
return NO;
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(allowRTL : (BOOL)value)
|
||||
- (void)allowRTL:(BOOL)value
|
||||
{
|
||||
[[RCTI18nUtil sharedInstance] allowRTL:value];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(forceRTL : (BOOL)value)
|
||||
- (void)forceRTL:(BOOL)value
|
||||
{
|
||||
[[RCTI18nUtil sharedInstance] forceRTL:value];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(swapLeftAndRightInRTL : (BOOL)value)
|
||||
- (void)swapLeftAndRightInRTL:(BOOL)value
|
||||
{
|
||||
[[RCTI18nUtil sharedInstance] swapLeftAndRightInRTL:value];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user