UNPKG

914 BTypeScriptView Raw
1interface LineAndCharacter {
2 line: number;
3 character: number;
4}
5export interface DiagnosticMessage {
6 messageText: string;
7 category: DiagnosticCategory;
8}
9export interface Diagnostic {
10 messageText: string | DiagnosticMessage[];
11 category: DiagnosticCategory;
12 target?: DiagnosticTarget;
13 file?: {
14 path: string;
15 position?: {
16 start: {
17 line: number;
18 };
19 } | {
20 start: LineAndCharacter;
21 end?: LineAndCharacter;
22 };
23 };
24}
25export declare enum DiagnosticCategory {
26 Warning = 0,
27 Error = 1,
28 Suggestion = 2,
29 Message = 3
30}
31export declare enum DiagnosticTarget {
32 App = "app",
33 Companion = "companion",
34 Settings = "settings"
35}
36export declare type DiagnosticHandler = (diagnostic: Diagnostic) => void;
37export declare const logDiagnosticToConsole: DiagnosticHandler;
38export {};