Skip to content

Commit 5442b80

Browse files
committed
chore(shared): create diagnostic error class
1 parent cd47f95 commit 5442b80

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
interface Range {
2+
line: number;
3+
column: number;
4+
}
5+
6+
interface DiagnosticLocation {
7+
start: Range;
8+
end: Range;
9+
}
10+
11+
export class DiagnosticError extends Error {
12+
constructor(
13+
public readonly location: DiagnosticLocation,
14+
public readonly message: string,
15+
) {
16+
super(message);
17+
}
18+
}

0 commit comments

Comments
 (0)