RN: Cleanup ExtendedError Type

Summary:
Cleans up the `ExtendedError` internal type and moves it into a separate module instead of burying it in `parseErrorStack.js`.

Also, this resolves some unnecessary Flow type suppressions.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D28470299

fbshipit-source-id: 04093243f06f67f41567270ef9778f01c7549b05
This commit is contained in:
Tim Yung
2021-05-19 12:30:41 -07:00
committed by Facebook GitHub Bot
parent 0dba0aff18
commit ede74e5936
8 changed files with 24 additions and 16 deletions
@@ -15,16 +15,6 @@ import type {HermesParsedStack} from './parseHermesStack';
const parseHermesStack = require('./parseHermesStack');
// $FlowFixMe[incompatible-exact]
export type ExtendedError = Error &
interface {
jsEngine?: string,
preventSymbolication?: boolean,
componentStack?: string,
forceRedbox?: boolean,
isComponentError?: boolean,
};
function convertHermesStack(stack: HermesParsedStack): Array<StackFrame> {
const frames = [];
for (const entry of stack.entries) {