|
8 | 8 | */ |
9 | 9 |
|
10 | 10 | import type {Fiber} from 'react-reconciler/src/ReactInternalTypes'; |
11 | | -import type {CurrentDispatcherRef, ReactRenderer, WorkTagMap} from './types'; |
12 | | -import type {BrowserTheme} from 'react-devtools-shared/src/devtools/views/DevTools'; |
| 11 | +import type { |
| 12 | + CurrentDispatcherRef, |
| 13 | + ReactRenderer, |
| 14 | + WorkTagMap, |
| 15 | + ConsolePatchSettings, |
| 16 | +} from './types'; |
13 | 17 | import {format, formatWithStyles} from './utils'; |
14 | 18 |
|
15 | 19 | import {getInternalReactConstants} from './renderer'; |
@@ -136,22 +140,14 @@ export function registerRenderer( |
136 | 140 | } |
137 | 141 | } |
138 | 142 |
|
139 | | -const consoleSettingsRef = { |
| 143 | +const consoleSettingsRef: ConsolePatchSettings = { |
140 | 144 | appendComponentStack: false, |
141 | 145 | breakOnConsoleErrors: false, |
142 | 146 | showInlineWarningsAndErrors: false, |
143 | 147 | hideConsoleLogsInStrictMode: false, |
144 | 148 | browserTheme: 'dark', |
145 | 149 | }; |
146 | 150 |
|
147 | | -export type ConsolePatchSettings = { |
148 | | - appendComponentStack: boolean, |
149 | | - breakOnConsoleErrors: boolean, |
150 | | - showInlineWarningsAndErrors: boolean, |
151 | | - hideConsoleLogsInStrictMode: boolean, |
152 | | - browserTheme: BrowserTheme, |
153 | | -}; |
154 | | - |
155 | 151 | // Patches console methods to append component stack for the current fiber. |
156 | 152 | // Call unpatch() to remove the injected behavior. |
157 | 153 | export function patch({ |
|
0 commit comments