diff --git a/packages/react-native/Libraries/Core/ExceptionsManager.js b/packages/react-native/Libraries/Core/ExceptionsManager.js index bfa73b3dd32d..423070b69869 100644 --- a/packages/react-native/Libraries/Core/ExceptionsManager.js +++ b/packages/react-native/Libraries/Core/ExceptionsManager.js @@ -78,7 +78,6 @@ function reportException( // $FlowFixMe[unclear-type] const extraData: any = { - // $FlowFixMe[incompatible-use] we can't define a type with a Symbol-keyed field in flow ...e[decoratedExtraDataKey], jsEngine: e.jsEngine, rawStack: e.stack, diff --git a/packages/react-native/Libraries/Core/ExtendedError.js b/packages/react-native/Libraries/Core/ExtendedError.js index c02cda89b024..e4790dcf3d76 100644 --- a/packages/react-native/Libraries/Core/ExtendedError.js +++ b/packages/react-native/Libraries/Core/ExtendedError.js @@ -15,9 +15,8 @@ export type ExtendedError = Error & componentStack?: ?string, isComponentError?: boolean, type?: string, - // Note: A field keyed by the Symbol ExceptionsManager.decoratedExtraDataKey is also read from ExtendedErrors. - // This field isn't documented in the types as Flow does not support this usecase, but it's effectively: - // [decoratedExtraDataKey]?: {[string]: mixed}, + // Keyed by ExceptionsManager.decoratedExtraDataKey. + RN$ErrorExtraDataKey?: {[key: string]: unknown}, // Included for native errors cause?: {