diff --git a/packages/react-native/types/modules/Devtools.d.ts b/packages/react-native/types/modules/Devtools.d.ts index d287d97c5a42..3dc52889233c 100644 --- a/packages/react-native/types/modules/Devtools.d.ts +++ b/packages/react-native/types/modules/Devtools.d.ts @@ -15,18 +15,30 @@ declare module 'react-native/Libraries/Core/Devtools/parseErrorStack' { column: number | null; }; - export interface ExtendedError extends Error { - framesToPop?: number | undefined; - } - - export default function parseErrorStack(error: ExtendedError): StackFrame[]; + export default function parseErrorStack(stack: string): StackFrame[]; } declare module 'react-native/Libraries/Core/Devtools/symbolicateStackTrace' { import {StackFrame} from 'react-native/Libraries/Core/Devtools/parseErrorStack'; + export type SymbolicatedStack = { + stack: StackFrame[]; + codeFrame?: CodeFrame | undefined; + }; + + export type CodeFrame = { + content: string; + location?: + | { + row: number; + column: number; + } + | undefined; + fileName: string; + }; + export default function symbolicateStackTrace( stack: ReadonlyArray, extraData?: any, - ): Promise; + ): Promise; }