Skip to content

Commit aa1e5f0

Browse files
committed
fix
1 parent 223a061 commit aa1e5f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/utils/ast-utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ export function getAttributeKeyText(
469469
switch (node.type) {
470470
case 'SvelteAttribute':
471471
case 'SvelteShorthandAttribute':
472+
case 'SvelteGenericsDirective':
472473
return node.key.name;
473474
case 'SvelteStyleDirective':
474475
return `style:${node.key.name.name}`;
@@ -481,7 +482,12 @@ export function getAttributeKeyText(
481482
}`;
482483
}
483484
default:
484-
throw new Error(`Unknown node type: ${node.type}`);
485+
throw new Error(
486+
`Unknown node type: ${
487+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- error
488+
(node as any).type
489+
}`
490+
);
485491
}
486492
}
487493

0 commit comments

Comments
 (0)