fix: skip AST analysis of TypeScript AST nodes (#11513)

* fix: skip AST analysis of TypeScript AST nodes

* fix: skip AST analysis of TypeScript AST nodes

* lint
pull/11503/head
Dominic Gannaway 8 months ago committed by GitHub
parent 28f3755e40
commit f543856cc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"svelte": patch
---
fix: skip AST analysis of TypeScript AST nodes

@ -280,6 +280,8 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
next({ scope }); next({ scope });
}; };
const skip = () => {};
/** /**
* @type {import('zimmerframe').Visitor<import('#compiler').ElementLike, State, import('#compiler').SvelteNode>} * @type {import('zimmerframe').Visitor<import('#compiler').ElementLike, State, import('#compiler').SvelteNode>}
*/ */
@ -674,7 +676,14 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
TransitionDirective: SvelteDirective, TransitionDirective: SvelteDirective,
AnimateDirective: SvelteDirective, AnimateDirective: SvelteDirective,
UseDirective: SvelteDirective UseDirective: SvelteDirective,
// @ts-ignore
TSTypeAnnotation: skip,
TSInterfaceDeclaration: skip,
TSTypeAliasDeclaration: skip,
TSTypeParameterDeclaration: skip,
TSEnumDeclaration: skip
// TODO others // TODO others
}); });

Loading…
Cancel
Save