-
Notifications
You must be signed in to change notification settings - Fork 120
/
problems.tsx
48 lines (44 loc) · 1.07 KB
/
problems.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { UniqueId } from 'mo/common/types';
import { ITreeNodeItemProps } from 'mo/components';
export enum MarkerSeverity {
Hint = 1,
Info = 2,
Warning = 4,
Error = 8,
}
export interface IRelatedInformation {
code: string;
message: string;
startLineNumber: number;
startColumn: number;
endLineNumber: number;
endColumn: number;
status: MarkerSeverity;
}
export interface IProblemsItem<T = any> extends ITreeNodeItemProps {
value: IRelatedInformation;
children: IProblemsItem[];
}
export interface IProblems<T = any> {
id: UniqueId;
name: string;
data: IProblemsItem<T>[];
show?: boolean;
}
export class ProblemsModel<T> implements IProblems<T> {
public id: UniqueId;
public name: string;
public data: IProblemsItem<T>[];
public show: boolean;
constructor(
id: UniqueId = '',
name: string = '',
data: IProblemsItem<T>[] = [],
show: boolean = false
) {
this.id = id;
this.name = name;
this.show = show;
this.data = data;
}
}