-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support of TypeScript inside Svelte components #34
Comments
Looking for this task I found the Babel Parser. This parser used by all babel eco-system and actually used in most of project build systems. Also this compiler output API looks very similar with espree parser that used in this project to parse scripts. The babel parser API allows parse not only code blocks, also that support parsing of simple expressions that can be usuful for template inline expressions. Before parser will be changed it is a good idea to done refactoring around V3 parser and split logic on multiple files. |
I was wondering if you were planning on including typescript support in v4 or rather do a v4 release while working on typescript support in a separate branch? |
I plan to release v4 tomorrow if all works well, and start playing around TS support in a new branch for v5 release |
Thank you for the great work! As of now, can I use the parser with my svelte-typescript project? I want to extract the exported props and their types into JSON. Is this supported? The current version on npm gave me an |
Hi @sidharthramesh thanks! For now, typescript is not supported yet by this library, but I'm already start working on it. I hope that I can provide some workaround soon |
Thank you @alexprey. For now, I guess I'll just use regex to extract out and parse the JSDocs in a svelte file. |
Ok, that time is come. I'm create a branch for typescript support ( The next step is provide the special API that can transpile typescript code to ES, which we can use later for parsing. This API should be similar with |
Want to express that I'm looking forward to this! I'm building my svelte app with Typescript using both rollup and webpack right now and they both work, but I get complaints from |
This would be a big win for the new Storybook svelte story formats as well, since it currently can't infer prop types in the auto generated documentation |
Hi, everyone! I'm back to work on that library and start intensive work with typescript parsing. I'm update initial task description to track progress of typescript parser implementation. |
I wonder, could it be possible to use https://github.com/sveltejs/language-tools/tree/master/packages/svelte2tsx to get you at least part of the way to typescript support? |
Would love to find out if anything ever came of this. Just discovered Storybook and am very excited to use it, but if it can't handle svelte/ts then I'm just going to have to remove it. |
Any news on this? would also love to have proper type support in storybook. And it seems like storybook uses this library for that. |
Use the native
typescript
packageAST Viewer: https://ts-ast-viewer.com
Plan
let a: IType
to beIType
)The text was updated successfully, but these errors were encountered: