Skip to content
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 TypeScript support #853

Open
opensas opened this issue Jul 22, 2020 · 18 comments
Open

Add TypeScript support #853

opensas opened this issue Jul 22, 2020 · 18 comments

Comments

@opensas
Copy link

opensas commented Jul 22, 2020

Now that official TypeScript support for Svelte has been announced, It would be very convenient to also add it to the Repl.

The Repl has become a very useful tool, not only to showcase applications and share code snippets, but also to report issues.

@pngwn
Copy link
Member

pngwn commented Jul 22, 2020

This is not a simple change, with the way things are setup. But I have been looking into this and other improvements over the past week.

@opensas
Copy link
Author

opensas commented Jul 24, 2020

Great to know, it really is a very useful tool.

@bradphelan
Copy link

This would be a great addition

@samuelandert
Copy link

Indeed, this is one of the most interesting and anticipated REPL features.

@danawoodman
Copy link

Will this be considered by the core team? Would be pretty rad 😸

@vinayakkulkarni
Copy link

Is there any way we, the community, can help contribute in building the REPL using TS ?

@hperrin
Copy link

hperrin commented Sep 8, 2021

Is there a way to at least strip type declarations from a Svelte file, then we could use that?

@Rich-Harris Rich-Harris transferred this issue from sveltejs/svelte-repl Dec 16, 2021
@fmp777
Copy link

fmp777 commented Feb 11, 2022

Wold be nice for sure! Would make REPL useful again!

@mawoka-myblock
Copy link

Wold be nice for sure! Would make REPL useful again!

It is definitely not useless, but TypeScript support would be great!

@ehartford
Copy link

I will send you a gift basket

@r-sw-eet
Copy link

omg, just found out, that ts in repl is not working. coming from angular, that hurts.
you are cutting off many devs trying out svelte via learning on repl.

@gyurielf
Copy link

Any update on this ?
It's still awaited feature.

@jacob-8
Copy link

jacob-8 commented Sep 16, 2022

Any update on this ?

I don't know the team's plans, but do note that when learn.svelte.dev is fully ready for use, it will open the door wide for lots of REPL innovation, including Typescript. I would wait for that tool to be finished up with the basic SvelteKit tutorials and examples, and then would expect Typescript to be right around the corner. Due to its use of WebContainers running Node in the browser, adding Typescript compilation will be similar to how we do it in our repos presently, just add svelte-preprocess to the svelte config file. If they plan to bring intellisense into their browser editor is yet to be seen, as well if they plan to turn learn.svelte.dev into a full blown REPL is also yet to be seen. But these things can't be too far out.

@Tal500
Copy link

Tal500 commented Feb 26, 2023

Any update on this ?

I don't know the team's plans, but do note that when learn.svelte.dev is fully ready for use, it will open the door wide for lots of REPL innovation, including Typescript. I would wait for that tool to be finished up with the basic SvelteKit tutorials and examples, and then would expect Typescript to be right around the corner. Due to its use of WebContainers running Node in the browser, adding Typescript compilation will be similar to how we do it in our repos presently, just add svelte-preprocess to the svelte config file. If they plan to bring intellisense into their browser editor is yet to be seen, as well if they plan to turn learn.svelte.dev into a full blown REPL is also yet to be seen. But these things can't be too far out.

While this feature and WebContainers are awesome, I still like the REPL as a lightweight alternative(in addition, not instead) to a virtual OS simulation on the web.

@markjaquith
Copy link

The Svelte 5 Preview Repl seems to support TypeScript. Can it be assumed that when Svelte 5 is released, that repl will graduate?

@braebo
Copy link
Member

braebo commented Oct 31, 2024

Is this planned?

@markjaquith
Copy link

TypeScript is working in the REPL (Playground) for me now. I think this can be closed.

@opensas
Copy link
Author

opensas commented Nov 2, 2024

I just did a very quick and dirty test, and it seems like it's basically just ignoring ts

I guess we should expect it to have some support similar to typescript playground. solid has something similar in place

svelte 5 playground (it doesn't complain at all)

image

ts playground

image

solid playground

image

or perhaps we should open a different issue for this....

@benmccann benmccann transferred this issue from sveltejs/sites Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests