You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating a package - svelte-ast-print, which under the hood uses this awesome package. Thank you for it! 馃檹
I'm attempting to achieve a momentum where I can support TypeScript syntax as well, so the ecosystem (especially for Svelte) can write codemods.
I personally have this need while contributing to @storybook/addon-svelte-csf - on an experimental support for Svelte v5. We want to improve developer's experience of migration from legacy syntax to modern. Currently, my printer (svelte-ast-print) will strip out all of the TypeScript syntax.
I know that Svelte parse does output AST nodes related to TypeScript syntax using typescript-acorn.
Possible blockers
typescript-acorn doesn't provide public types (interfaces) for AST nodes, nor there's any known to me a public/official ESTree TypeScript AST specification.
If there's an agreement to help support TypeScript AST nodes with this package - esrap. Then I can help contributing to this package with exposing types of AST nodes related to TypeScript which typescript-acorn spills out.
The text was updated successfully, but these errors were encountered:
If we agree that it's too "dangerous" to add first class support for typescript-acorn nodes, I'm wondering if instead there's a way to create somewhat of a plugin API, where devs can contribute AST node->string participants that esrap then uses in a certain manner.
I'm creating a package -
svelte-ast-print
, which under the hood uses this awesome package. Thank you for it! 馃檹I'm attempting to achieve a momentum where I can support TypeScript syntax as well, so the ecosystem (especially for Svelte) can write codemods.
I personally have this need while contributing to
@storybook/addon-svelte-csf
- on an experimental support for Svelte v5. We want to improve developer's experience of migration from legacy syntax to modern. Currently, my printer (svelte-ast-print
) will strip out all of the TypeScript syntax.I know that Svelte
parse
does output AST nodes related to TypeScript syntax usingtypescript-acorn
.Possible blockers
typescript-acorn
doesn't provide public types (interfaces) for AST nodes, nor there's any known to me a public/official ESTree TypeScript AST specification.If there's an agreement to help support TypeScript AST nodes with this package -
esrap
. Then I can help contributing to this package with exposing types of AST nodes related to TypeScript whichtypescript-acorn
spills out.The text was updated successfully, but these errors were encountered: