-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Svelte AST node types from svelte/compiler
to public
#12292
Comments
svelte/compiler
svelte/compiler
to public
We also need need this to get SvelteKit passing against the ecosystem CI since enhanced-img uses things like https://github.com/sveltejs/kit/blob/43544107269013e8b5160d268da25f1e003b6f6f/packages/enhanced-img/src/preprocessor.js#L44 |
If we expose them again I'd like us to make sure somehow to not expose the internal properties of the AST nodes (for example |
Hey @dummdidumm, is it just the I imagine the desire is to incorporate this into the build script rather than just exporting with |
Yeah metadata is basically all that needs to be removed (and if there's a |
@huntabyte there was some additional discussion in the original Discord thread FYI: https://discord.com/channels/457912077277855764/1258093339232702556 |
... using `@internal` JSDoc tags, if the `stripInternal` tsconfig compiler option is enabled. This means types annotated with `@internal` will be stripped both from .js/ts files going through the TS program aswell as d.ts files going through our logic part of sveltejs/svelte#12292
Also hides the legacy AST types from the output closes #12292
* feat: support stripping internal types ... using `@internal` JSDoc tags, if the `stripInternal` tsconfig compiler option is enabled. This means types annotated with `@internal` will be stripped both from .js/ts files going through the TS program aswell as d.ts files going through our logic part of sveltejs/svelte#12292 * try fixing CI
Describe the problem
As per thread on Discord.
I was working on addon for Storybook -
@storybook/addon-svelte-csf
. It usessvelte/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 fromsvelte/compiler
are no longer exposed to public.Such as:
Component
(AST version)Root
SnippetBlock
SvelteNode
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
The text was updated successfully, but these errors were encountered: