[compiler] remove use of inspect module (#34124)

This commit is contained in:
Joseph Savona 2025-08-06 23:59:55 -07:00 committed by GitHub
parent c403a7c548
commit f468d37739
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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': {