diff options
Diffstat (limited to 'subprojects/frontend/src/editor/DiagnosticValue.ts')
-rw-r--r-- | subprojects/frontend/src/editor/DiagnosticValue.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/subprojects/frontend/src/editor/DiagnosticValue.ts b/subprojects/frontend/src/editor/DiagnosticValue.ts index ad23c467..b4e0b165 100644 --- a/subprojects/frontend/src/editor/DiagnosticValue.ts +++ b/subprojects/frontend/src/editor/DiagnosticValue.ts | |||
@@ -1,14 +1,16 @@ | |||
1 | import type { Diagnostic } from '@codemirror/lint'; | 1 | import type { Diagnostic } from '@codemirror/lint'; |
2 | import { RangeValue } from '@codemirror/state'; | 2 | import { RangeValue } from '@codemirror/state'; |
3 | 3 | ||
4 | export type Severity = Diagnostic['severity']; | ||
5 | |||
4 | export default class DiagnosticValue extends RangeValue { | 6 | export default class DiagnosticValue extends RangeValue { |
5 | static VALUES: Record<Diagnostic['severity'], DiagnosticValue> = { | 7 | static VALUES: Record<Severity, DiagnosticValue> = { |
6 | error: new DiagnosticValue('error'), | 8 | error: new DiagnosticValue('error'), |
7 | warning: new DiagnosticValue('warning'), | 9 | warning: new DiagnosticValue('warning'), |
8 | info: new DiagnosticValue('info'), | 10 | info: new DiagnosticValue('info'), |
9 | }; | 11 | }; |
10 | 12 | ||
11 | private constructor(public readonly severity: Diagnostic['severity']) { | 13 | private constructor(public readonly severity: Severity) { |
12 | super(); | 14 | super(); |
13 | } | 15 | } |
14 | 16 | ||