From a69badd4682f06fb164717b78eb8a972cce9df35 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Wed, 8 Jul 2026 08:27:48 -0700 Subject: [PATCH] Add missing LogBox method declarations to LogBox.d.ts (#57472) Summary: Pull Request resolved: https://github.com/react/react-native/pull/57472 `LogBox.d.ts` declared only `ignoreLogs`, `ignoreAllLogs`, `install`, and `uninstall`, but the runtime `LogBox` object also exposes `isInstalled()` and `clearAllLogs()`. Add these two signatures so TypeScript consumers can call them without casting. Changelog: [General][Added] - Add `isInstalled()` and `clearAllLogs()` to the `LogBox` TypeScript declarations Reviewed By: christophpurrer Differential Revision: D110930249 fbshipit-source-id: a7b739266ebf02297797b47ff6931652a359d1cf --- packages/react-native/Libraries/LogBox/LogBox.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/react-native/Libraries/LogBox/LogBox.d.ts b/packages/react-native/Libraries/LogBox/LogBox.d.ts index 52725028153..994bff44dc5 100644 --- a/packages/react-native/Libraries/LogBox/LogBox.d.ts +++ b/packages/react-native/Libraries/LogBox/LogBox.d.ts @@ -22,6 +22,17 @@ export interface LogBoxStatic { install(): void; uninstall(): void; + + /** + * Whether LogBox is currently installed. + */ + isInstalled(): boolean; + + /** + * Clear all logs and dismiss the LogBox surface. Invoked by the Fast Refresh + * pipeline on each applied update. + */ + clearAllLogs(): void; } export const LogBox: LogBoxStatic;