Skip to content

Expose Svelte AST node types from svelte/compiler to public #12292

Closed
@xeho91

Description

@xeho91

Describe the problem

As per thread on Discord.

I was working on addon for Storybook - @storybook/addon-svelte-csf. It uses svelte/compiler to extract Svelte AST nodes and analyss them for further code transformation.

Then I upgraded Svelte version. And I have noticed that since this release svelte@5.0.0-next.165 AST nodes from svelte/compiler are no longer exposed to public.

Such as:

  • Component (AST version)
  • Root
  • SnippetBlock
  • SvelteNode
  • ... etc.

Possibly related PR: Rich-Harris/dts-buddy#82

Describe the proposed solution

I would like to be able to access those Svelte AST nodes, so I can have a better typings experience on those AST data structures.

Importance

would make my life easier

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions