diff --git a/compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts b/compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts index b4f91ab478e69..21391b197b798 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Flood/Types.ts @@ -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( type: ConcreteType, printType: (_: T) => string, @@ -241,7 +240,7 @@ export function printConcrete( 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': {