|
|
@ -88,7 +88,9 @@ const parse = {
|
|
|
|
'illegal-subscription': () => `Cannot reference store value inside <script context="module">`,
|
|
|
|
'illegal-subscription': () => `Cannot reference store value inside <script context="module">`,
|
|
|
|
'duplicate-style-element': () => `A component can have a single top-level <style> element`,
|
|
|
|
'duplicate-style-element': () => `A component can have a single top-level <style> element`,
|
|
|
|
'duplicate-script-element': () =>
|
|
|
|
'duplicate-script-element': () =>
|
|
|
|
`A component can have a single top-level <script> element and/or a single top-level <script context="module"> element`
|
|
|
|
`A component can have a single top-level <script> element and/or a single top-level <script context="module"> element`,
|
|
|
|
|
|
|
|
'invalid-render-expression': () => 'expected an identifier followed by (...)',
|
|
|
|
|
|
|
|
'invalid-render-arguments': () => 'expected at most one argument'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @satisfies {Errors} */
|
|
|
|
/** @satisfies {Errors} */
|
|
|
@ -508,7 +510,7 @@ export class CompileError extends Error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @template {keyof typeof errors} T
|
|
|
|
* @template {Exclude<keyof typeof errors, 'TODO'>} T
|
|
|
|
* @param {NodeLike | number | null} node
|
|
|
|
* @param {NodeLike | number | null} node
|
|
|
|
* @param {T} code
|
|
|
|
* @param {T} code
|
|
|
|
* @param {Parameters<typeof errors[T]>} args
|
|
|
|
* @param {Parameters<typeof errors[T]>} args
|
|
|
|