diff --git a/packages/metro/src/lib/JsonReporter.js b/packages/metro/src/lib/JsonReporter.js index 0c5a117244..34b697ee27 100644 --- a/packages/metro/src/lib/JsonReporter.js +++ b/packages/metro/src/lib/JsonReporter.js @@ -13,6 +13,18 @@ import type {Writable} from 'stream'; +export type SerializedEvent = TEvent extends { + error: Error, + ... +} + ? { + ...Omit, + message: string, + stack: string, + ... + } + : TEvent; + class JsonReporter { _stream: Writable;