Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions packages/react-native/types/modules/Devtools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,35 @@

declare module 'react-native/Libraries/Core/Devtools/parseErrorStack' {
export type StackFrame = {
file: string;
column: number | null | undefined;
file: string | null | undefined;
lineNumber: number | null | undefined;
methodName: string;
lineNumber: number;
column: number | null;
};

export interface ExtendedError extends Error {
framesToPop?: number | undefined;
}

export default function parseErrorStack(error: ExtendedError): StackFrame[];
export default function parseErrorStack(errorStack?: string): StackFrame[];
}

declare module 'react-native/Libraries/Core/Devtools/symbolicateStackTrace' {
import {StackFrame} from 'react-native/Libraries/Core/Devtools/parseErrorStack';

export type CodeFrame = Readonly<{
content: string;
location: {
row: number;
column: number;
[key: string]: any;
} | null | undefined;
fileName: string;
}>;

export type SymbolicatedStackTrace = Readonly<{
stack: ReadonlyArray<StackFrame>;
codeFrame: CodeFrame | null | undefined;
}>;

export default function symbolicateStackTrace(
stack: ReadonlyArray<StackFrame>,
extraData?: any,
): Promise<StackFrame[]>;
): Promise<SymbolicatedStackTrace>;
}
Loading