@@ -36,10 +36,6 @@ import {
36
36
TREE_OPERATION_UPDATE_TREE_BASE_DURATION ,
37
37
LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY ,
38
38
LOCAL_STORAGE_OPEN_IN_EDITOR_URL ,
39
- LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS ,
40
- LOCAL_STORAGE_SHOULD_APPEND_COMPONENT_STACK_KEY ,
41
- LOCAL_STORAGE_SHOW_INLINE_WARNINGS_AND_ERRORS_KEY ,
42
- LOCAL_STORAGE_HIDE_CONSOLE_LOGS_IN_STRICT_MODE ,
43
39
} from './constants' ;
44
40
import {
45
41
ComponentFilterElementType ,
@@ -61,7 +57,6 @@ import isArray from './isArray';
61
57
import type {
62
58
ComponentFilter ,
63
59
ElementType ,
64
- BrowserTheme ,
65
60
SerializedElement as SerializedElementFrontend ,
66
61
LRUCache ,
67
62
} from 'react-devtools-shared/src/frontend/types' ;
@@ -374,53 +369,6 @@ export function filterOutLocationComponentFilters(
374
369
return componentFilters.filter(f => f . type !== ComponentFilterLocation ) ;
375
370
}
376
371
377
- function parseBool ( s : ?string ) : ?boolean {
378
- if ( s === 'true' ) {
379
- return true ;
380
- }
381
- if (s === 'false') {
382
- return false ;
383
- }
384
- }
385
-
386
- export function castBool ( v : any ) : ?boolean {
387
- if ( v === true || v === false ) {
388
- return v ;
389
- }
390
- }
391
-
392
- export function castBrowserTheme ( v : any ) : ?BrowserTheme {
393
- if ( v === 'light' || v === 'dark' || v === 'auto' ) {
394
- return v ;
395
- }
396
- }
397
-
398
- export function getAppendComponentStack ( ) : boolean {
399
- const raw = localStorageGetItem (
400
- LOCAL_STORAGE_SHOULD_APPEND_COMPONENT_STACK_KEY ,
401
- ) ;
402
- return parseBool ( raw ) ?? true ;
403
- }
404
-
405
- export function getBreakOnConsoleErrors(): boolean {
406
- const raw = localStorageGetItem ( LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS ) ;
407
- return parseBool ( raw ) ?? false ;
408
- }
409
-
410
- export function getHideConsoleLogsInStrictMode(): boolean {
411
- const raw = localStorageGetItem (
412
- LOCAL_STORAGE_HIDE_CONSOLE_LOGS_IN_STRICT_MODE ,
413
- ) ;
414
- return parseBool ( raw ) ?? false ;
415
- }
416
-
417
- export function getShowInlineWarningsAndErrors(): boolean {
418
- const raw = localStorageGetItem (
419
- LOCAL_STORAGE_SHOW_INLINE_WARNINGS_AND_ERRORS_KEY ,
420
- ) ;
421
- return parseBool ( raw ) ?? true ;
422
- }
423
-
424
372
export function getDefaultOpenInEditorURL ( ) : string {
425
373
return typeof process . env . EDITOR_URL === 'string'
426
374
? process . env . EDITOR_URL
0 commit comments