Skip to content

Commit f468d37

Browse files
authored
[compiler] remove use of inspect module (facebook#34124)
1 parent c403a7c commit f468d37

File tree

1 file changed

+2
-3
lines changed
  • compiler/packages/babel-plugin-react-compiler/src/Flood

1 file changed

+2
-3
lines changed

compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import * as t from '@babel/types';
1010
import * as TypeErrors from './TypeErrors';
1111
import {assertExhaustive} from '../Utils/utils';
12+
import {FlowType} from './FlowTypes';
1213

1314
export const DEBUG = false;
1415

@@ -196,8 +197,6 @@ export function makeVariableId(id: number): VariableId {
196197
return id as VariableId;
197198
}
198199

199-
import {inspect} from 'util';
200-
import {FlowType} from './FlowTypes';
201200
export function printConcrete<T>(
202201
type: ConcreteType<T>,
203202
printType: (_: T) => string,
@@ -241,7 +240,7 @@ export function printConcrete<T>(
241240
case 'Generic':
242241
return `T${type.id}`;
243242
case 'Object': {
244-
const name = `Object ${inspect([...type.members.keys()])}`;
243+
const name = `Object [${[...type.members.keys()].map(key => JSON.stringify(key)).join(', ')}]`;
245244
return `${name}`;
246245
}
247246
case 'Tuple': {

0 commit comments

Comments
 (0)