UNPKG

880 BTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 */
9
10declare module 'react-native/Libraries/Core/Devtools/parseErrorStack' {
11 export type StackFrame = {
12 file: string;
13 methodName: string;
14 lineNumber: number;
15 column: number | null;
16 };
17
18 export interface ExtendedError extends Error {
19 framesToPop?: number | undefined;
20 }
21
22 export default function parseErrorStack(error: ExtendedError): StackFrame[];
23}
24
25declare module 'react-native/Libraries/Core/Devtools/symbolicateStackTrace' {
26 import {StackFrame} from 'react-native/Libraries/Core/Devtools/parseErrorStack';
27
28 export default function symbolicateStackTrace(
29 stack: ReadonlyArray<StackFrame>,
30 extraData?: any,
31 ): Promise<StackFrame[]>;
32}