C++ Turbo Module > Allow Promise<void> types (#52388)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52388

Changelog: [Internal]

Similar to `AsyncCallback<>` (the foundation of `AsyncPromise`) we should allow `void` Promise types in C++ such as `AsyncPromise<>`

Reviewed By: rbergerjr

Differential Revision: D77712020

fbshipit-source-id: d7360df5cc1b77f1e03e5fb73b0b468f6e3a415b
This commit is contained in:
Christoph Purrer
2025-07-06 19:53:51 -07:00
committed by Facebook GitHub Bot
parent 255977a7b9
commit e8709355dc
5 changed files with 33 additions and 15 deletions
@@ -105,6 +105,7 @@ export interface Spec extends TurboModule {
+getValueWithPromise: (error: boolean) => Promise<string>;
+getWithWithOptionalArgs: (optionalArg?: boolean) => ?boolean;
+voidFunc: () => void;
+voidPromise: () => Promise<void>;
+setMenu: (menuItem: MenuItem) => void;
+emitCustomDeviceEvent: (eventName: string) => void;
+voidFuncThrows: () => void;