Skip to content

Commit c7c8d49

Browse files
committed
sigh
1 parent 0ac0382 commit c7c8d49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte/src/compiler/utils/extract_svelte_ignore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export function extract_svelte_ignore(offset, text, runes) {
2727
// Warnings have to be separated by commas, everything after is interpreted as prose
2828
for (const match of text.slice(length).matchAll(/([\w$-]+)(,)?/gm)) {
2929
const code = match[1];
30-
const x = match.index + 1; // ???
3130

3231
ignores.push(code);
3332

3433
if (!w.codes.includes(code)) {
3534
const replacement = replacements[code] ?? code.replace(/-/g, '_');
3635

3736
if (runes) {
38-
const start = offset + match.index;
37+
// The type cast is for some reason necessary to pass the type check in CI
38+
const start = offset + /** @type {number} */ (match.index);
3939
const end = start + code.length;
4040

4141
if (w.codes.includes(replacement)) {

0 commit comments

Comments
 (0)