@samitouri / QOS-React-2 / commits / f468d37739

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

Joseph Savona committed Aug 6, 2025 at 23:59 UTC f468d37739cbce9caff88c3b83aca47b0ea7bdbc
1 file changed +2 -3
compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts
+2 -3
@@ -9,6 +9,7 @@ import {
9 import * as t from '@babel/types';
10 import * as TypeErrors from './TypeErrors';
11 import {assertExhaustive} from '../Utils/utils';
12 +import {FlowType} from './FlowTypes';
13
14 export const DEBUG = false;
15
@@ -196,8 +197,6 @@ export function makeVariableId(id: number): VariableId {
197 return id as VariableId;
198 }
199
199 -import {inspect} from 'util';
200 -import {FlowType} from './FlowTypes';
200 export function printConcrete<T>(
201 type: ConcreteType<T>,
202 printType: (_: T) => string,
@@ -241,7 +240,7 @@ export function printConcrete<T>(
240 case 'Generic':
241 return `T${type.id}`;
242 case 'Object': {
244 - const name = `Object ${inspect([...type.members.keys()])}`;
243 + const name = `Object [${[...type.members.keys()].map(key => JSON.stringify(key)).join(', ')}]`;
244 return `${name}`;
245 }
246 case 'Tuple': {