We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fd3ba commit 46773d5Copy full SHA for 46773d5
packages/sv/lib/core/tooling/index.ts
@@ -26,15 +26,15 @@ export function parseScript(content: string): {
26
ast: TsEstree.Program;
27
comments: Comments;
28
} {
29
- const svelteAst = parseSvelte(`<script lang="ts">${content}</script>`);
30
- const ast = ensureScript(svelteAst);
+ const ast = parseSvelte(`<script lang="ts">${content}</script>`);
+ ensureScript(ast);
31
32
const comments = new Comments();
33
const internal = transformToInternal(comments);
34
- internal.original.push(...svelteAst.comments);
+ internal.original.push(...ast.comments);
35
36
return {
37
- ast,
+ ast: ast.instance.content,
38
comments
39
};
40
}
0 commit comments