@bacons/expo-metro-runtime
Version:
Tools for making experimental Metro bundler features work
45 lines (44 loc) • 1.32 kB
TypeScript
/**
* Copyright (c) Evan Bacon.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
declare type ExceptionData = any;
import type { LogBoxLogData } from './LogBoxLog';
export declare type ExtendedExceptionData = ExceptionData & {
isComponentError: boolean;
[key: string]: any;
};
export declare type Category = string;
export declare type CodeFrame = {
content: string;
location?: {
row: number;
column: number;
[key: string]: any;
} | null;
fileName: string;
collapse?: boolean;
};
export declare type Message = {
content: string;
substitutions: Array<{
length: number;
offset: number;
}>;
};
export declare type ComponentStack = CodeFrame[];
export declare function parseInterpolation(args: readonly any[]): readonly {
category: Category;
message: Message;
}[];
export declare function parseComponentStack(message: string): ComponentStack;
export declare function parseLogBoxException(error: ExtendedExceptionData): LogBoxLogData;
export declare function parseLogBoxLog(args: readonly any[]): {
componentStack: ComponentStack;
category: Category;
message: Message;
};
export {};