diff --git a/packages/core/src/parsers/svelte/module/index.ts b/packages/core/src/parsers/svelte/module/index.ts index e10b1b1e7b..63113d22cb 100644 --- a/packages/core/src/parsers/svelte/module/index.ts +++ b/packages/core/src/parsers/svelte/module/index.ts @@ -8,6 +8,8 @@ import type { SveltosisComponent } from '../types'; function handleExportNamedDeclaration(json: SveltosisComponent, node: ExportNamedDeclaration) { const declarations = (node.declaration as VariableDeclaration)?.declarations; + // FIXME(milahu): loop declarations + //for (const declaration of node.declarations) {} if (declarations?.length) { const declaration = declarations[0]; const property = (declaration.id as Identifier).name; @@ -27,6 +29,15 @@ function handleExportNamedDeclaration(json: SveltosisComponent, node: ExportName } } +function handleVariableDeclaration(_json: SveltosisComponent, _node: VariableDeclaration) { + throw new Error('not implemented: VariableDeclaration in svelte