chore: CompileDiagnostic no longer extends Error (#13651)

pull/13679/head
Dominic Gannaway 11 months ago committed by GitHub
parent 61391c8704
commit 894b1c37ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: CompileDiagnostic no longer extends Error

@ -48,7 +48,7 @@ function get_code_frame(source, line, column) {
*/
/** @implements {ICompileDiagnostic} */
export class CompileDiagnostic extends Error {
export class CompileDiagnostic {
name = 'CompileDiagnostic';
/**
@ -57,8 +57,8 @@ export class CompileDiagnostic extends Error {
* @param {[number, number] | undefined} position
*/
constructor(code, message, position) {
super(message);
this.code = code;
this.message = message;
if (state.filename) {
this.filename = state.filename;

Loading…
Cancel
Save