mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
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
This commit is contained in:
1 parent
c080619353
commit
a69badd468
1 file changed
+11
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user