1 | /**
|
2 | * Log from which we've been able to glean further information
|
3 | * @type D type of additional structured data, if available
|
4 | */
|
5 | export interface InterpretedLog<D = any> {
|
6 | /**
|
7 | * Relevant part of log to display in UX, if we were able to identify it
|
8 | */
|
9 | relevantPart: string;
|
10 | message: string;
|
11 | /**
|
12 | * Should the UX include the full log, or is it too long or ugly?
|
13 | */
|
14 | includeFullLog?: boolean;
|
15 | /**
|
16 | * Additional structured information from the log, if specified
|
17 | */
|
18 | data?: D;
|
19 | /**
|
20 | * Set to true only if we should not bother to report this log to the user
|
21 | */
|
22 | doNotReportToUser?: boolean;
|
23 | }
|
24 | /**
|
25 | * Function that can try to interpret a log for display to a user.
|
26 | * Return undefined if the log cannot be interpreted.
|
27 | */
|
28 | export declare type InterpretLog<D = any> = (log: string) => InterpretedLog<D> | undefined;
|
29 | /**
|
30 | * Implemented by types that have the ability to interpret the logs they generate
|
31 | */
|
32 | export interface LogInterpretation {
|
33 | logInterpreter: InterpretLog;
|
34 | }
|
35 | //# sourceMappingURL=InterpretedLog.d.ts.map |
\ | No newline at end of file |