mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[compiler] remove use of inspect module (#34124)
This commit is contained in:
parent
c403a7c548
commit
f468d37739
|
|
@ -9,6 +9,7 @@ import {
|
|||
import * as t from '@babel/types';
|
||||
import * as TypeErrors from './TypeErrors';
|
||||
import {assertExhaustive} from '../Utils/utils';
|
||||
import {FlowType} from './FlowTypes';
|
||||
|
||||
export const DEBUG = false;
|
||||
|
||||
|
|
@ -196,8 +197,6 @@ export function makeVariableId(id: number): VariableId {
|
|||
return id as VariableId;
|
||||
}
|
||||
|
||||
import {inspect} from 'util';
|
||||
import {FlowType} from './FlowTypes';
|
||||
export function printConcrete<T>(
|
||||
type: ConcreteType<T>,
|
||||
printType: (_: T) => string,
|
||||
|
|
@ -241,7 +240,7 @@ export function printConcrete<T>(
|
|||
case 'Generic':
|
||||
return `T${type.id}`;
|
||||
case 'Object': {
|
||||
const name = `Object ${inspect([...type.members.keys()])}`;
|
||||
const name = `Object [${[...type.members.keys()].map(key => JSON.stringify(key)).join(', ')}]`;
|
||||
return `${name}`;
|
||||
}
|
||||
case 'Tuple': {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user