1*26ad19fcSEvan Bacon/** 2*26ad19fcSEvan Bacon * Copyright (c) 650 Industries. 3*26ad19fcSEvan Bacon * Copyright (c) Meta Platforms, Inc. and affiliates. 4*26ad19fcSEvan Bacon * 5*26ad19fcSEvan Bacon * This source code is licensed under the MIT license found in the 6*26ad19fcSEvan Bacon * LICENSE file in the root directory of this source tree. 7*26ad19fcSEvan Bacon */ 8*26ad19fcSEvan Baconimport type { Stack } from './LogBoxSymbolication'; 9*26ad19fcSEvan Baconimport type { Category, Message, ComponentStack, CodeFrame } from './parseLogBoxLog'; 10*26ad19fcSEvan Bacontype SymbolicationStatus = 'NONE' | 'PENDING' | 'COMPLETE' | 'FAILED'; 11*26ad19fcSEvan Baconexport type LogLevel = 'warn' | 'error' | 'fatal' | 'syntax' | 'static'; 12*26ad19fcSEvan Baconexport type LogBoxLogData = { 13*26ad19fcSEvan Bacon level: LogLevel; 14*26ad19fcSEvan Bacon type?: string; 15*26ad19fcSEvan Bacon message: Message; 16*26ad19fcSEvan Bacon stack: Stack; 17*26ad19fcSEvan Bacon category: string; 18*26ad19fcSEvan Bacon componentStack: ComponentStack; 19*26ad19fcSEvan Bacon codeFrame?: CodeFrame; 20*26ad19fcSEvan Bacon isComponentError: boolean; 21*26ad19fcSEvan Bacon}; 22*26ad19fcSEvan Baconexport type StackType = 'stack' | 'component'; 23*26ad19fcSEvan Bacontype SymbolicationResult = { 24*26ad19fcSEvan Bacon error: null; 25*26ad19fcSEvan Bacon stack: null; 26*26ad19fcSEvan Bacon status: 'NONE'; 27*26ad19fcSEvan Bacon} | { 28*26ad19fcSEvan Bacon error: null; 29*26ad19fcSEvan Bacon stack: null; 30*26ad19fcSEvan Bacon status: 'PENDING'; 31*26ad19fcSEvan Bacon} | { 32*26ad19fcSEvan Bacon error: null; 33*26ad19fcSEvan Bacon stack: Stack; 34*26ad19fcSEvan Bacon status: 'COMPLETE'; 35*26ad19fcSEvan Bacon} | { 36*26ad19fcSEvan Bacon error: Error; 37*26ad19fcSEvan Bacon stack: null; 38*26ad19fcSEvan Bacon status: 'FAILED'; 39*26ad19fcSEvan Bacon}; 40*26ad19fcSEvan Baconexport declare class LogBoxLog { 41*26ad19fcSEvan Bacon message: Message; 42*26ad19fcSEvan Bacon type: string; 43*26ad19fcSEvan Bacon category: Category; 44*26ad19fcSEvan Bacon componentStack: ComponentStack; 45*26ad19fcSEvan Bacon stack: Stack; 46*26ad19fcSEvan Bacon count: number; 47*26ad19fcSEvan Bacon level: LogLevel; 48*26ad19fcSEvan Bacon codeFrame?: CodeFrame; 49*26ad19fcSEvan Bacon isComponentError: boolean; 50*26ad19fcSEvan Bacon symbolicated: Record<StackType, SymbolicationResult>; 51*26ad19fcSEvan Bacon private callbacks; 52*26ad19fcSEvan Bacon constructor(data: LogBoxLogData & { 53*26ad19fcSEvan Bacon symbolicated?: Record<StackType, SymbolicationResult>; 54*26ad19fcSEvan Bacon }); 55*26ad19fcSEvan Bacon incrementCount(): void; 56*26ad19fcSEvan Bacon getAvailableStack(type: StackType): Stack | null; 57*26ad19fcSEvan Bacon private flushCallbacks; 58*26ad19fcSEvan Bacon private pushCallback; 59*26ad19fcSEvan Bacon retrySymbolicate(type: StackType, callback?: (status: SymbolicationStatus) => void): void; 60*26ad19fcSEvan Bacon symbolicate(type: StackType, callback?: (status: SymbolicationStatus) => void): void; 61*26ad19fcSEvan Bacon private _symbolicate; 62*26ad19fcSEvan Bacon private componentStackCache; 63*26ad19fcSEvan Bacon private getStack; 64*26ad19fcSEvan Bacon private handleSymbolicate; 65*26ad19fcSEvan Bacon private updateStatus; 66*26ad19fcSEvan Bacon} 67*26ad19fcSEvan Baconexport {}; 68*26ad19fcSEvan Bacon//# sourceMappingURL=LogBoxLog.d.ts.map