praxis-kit 4.0.3 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,16 +80,6 @@ declare enum DiagnosticCode {
80
80
  type StringMap<T = unknown> = Record<string, T>;
81
81
  type AnyRecord = StringMap<unknown>;
82
82
 
83
- interface SourcePosition {
84
- line: number;
85
- col: number;
86
- }
87
- interface SourceLocation {
88
- file: string;
89
- start: SourcePosition;
90
- end?: SourcePosition;
91
- }
92
-
93
83
  declare enum Severity {
94
84
  Debug = 0,
95
85
  Info = 1,
@@ -99,14 +89,22 @@ declare enum Severity {
99
89
  }
100
90
  declare function isAtLeast(s: Severity, threshold: Severity): boolean;
101
91
 
92
+ type Context = AnyRecord;
93
+ type Metadata = AnyRecord;
94
+ interface SourcePosition {
95
+ line: number;
96
+ col: number;
97
+ }
98
+ interface SourceLocation {
99
+ file: string;
100
+ start: SourcePosition;
101
+ end?: SourcePosition;
102
+ }
102
103
  interface DiagnosticSuggestion {
103
104
  title: string;
104
105
  description?: string;
105
106
  fix?: string;
106
107
  }
107
-
108
- type Context = AnyRecord;
109
- type Metadata = AnyRecord;
110
108
  interface Diagnostic {
111
109
  code: DiagnosticCode;
112
110
  severity: Severity;
@@ -120,6 +118,9 @@ interface Diagnostic {
120
118
  context?: Context;
121
119
  metadata?: Metadata;
122
120
  }
121
+ interface DiagnosticReporter {
122
+ report(diagnostic: Diagnostic): void;
123
+ }
123
124
 
124
125
  declare enum Enforcement {
125
126
  Ignore = 0,
@@ -140,10 +141,6 @@ declare class DefaultPolicy implements DiagnosticPolicy {
140
141
  resolve(diagnostic: Diagnostic): Enforcement;
141
142
  }
142
143
 
143
- interface DiagnosticReporter {
144
- report(diagnostic: Diagnostic): void;
145
- }
146
-
147
144
  type DiagnosticInput = Except<Diagnostic, 'severity'>;
148
145
  declare class Diagnostics {
149
146
  private readonly reporter;