File tree 1 file changed +3
-4
lines changed
packages/react-devtools-shared/src/backend/fiber
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ function createVirtualInstance(
248
248
type DevToolsInstance = FiberInstance | VirtualInstance | FilteredFiberInstance ;
249
249
250
250
type getDisplayNameForFiberType = ( fiber : Fiber ) => string | null ;
251
- type getTypeSymbolType = ( type : any ) => symbol | number ;
251
+ type getTypeSymbolType = ( type : any ) => symbol | string | number ;
252
252
253
253
type ReactPriorityLevelsType = {
254
254
ImmediatePriority : number ,
@@ -541,13 +541,12 @@ export function getInternalReactConstants(version: string): {
541
541
// End of copied code.
542
542
// **********************************************************
543
543
544
- function getTypeSymbol ( type : any ) : symbol | number {
544
+ function getTypeSymbol ( type : any ) : symbol | string | number {
545
545
const symbolOrNumber =
546
546
typeof type === 'object' && type !== null ? type . $$typeof : type ;
547
547
548
548
return typeof symbolOrNumber === 'symbol'
549
- ? // $FlowFixMe[incompatible-return] `toString()` doesn't match the type signature?
550
- symbolOrNumber . toString ( )
549
+ ? symbolOrNumber . toString ( )
551
550
: symbolOrNumber ;
552
551
}
553
552
You can’t perform that action at this time.
0 commit comments