sites icon indicating copy to clipboard operation
sites copied to clipboard

Add TypeScript support

Open opensas opened this issue 4 years ago • 15 comments

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.

opensas avatar Jul 22 '20 10:07 opensas

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.

pngwn avatar Jul 22 '20 13:07 pngwn

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

opensas avatar Jul 24 '20 05:07 opensas

This would be a great addition

bradphelan avatar Oct 25 '20 08:10 bradphelan

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

samuelandert avatar Nov 22 '20 10:11 samuelandert

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

danawoodman avatar Feb 01 '21 17:02 danawoodman

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

vinayakkulkarni avatar Aug 29 '21 14:08 vinayakkulkarni

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

hperrin avatar Sep 08 '21 20:09 hperrin

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

fmp777 avatar Feb 11 '22 20:02 fmp777

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

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

mawoka-myblock avatar Mar 05 '22 16:03 mawoka-myblock

I will send you a gift basket

ehartford avatar Mar 18 '22 18:03 ehartford

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.

r-sw-eet avatar May 11 '22 20:05 r-sw-eet

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

gyurielf avatar Sep 16 '22 08:09 gyurielf

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.

jacob-8 avatar Sep 16 '22 09:09 jacob-8

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.

Tal500 avatar Feb 26 '23 08:02 Tal500

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

markjaquith avatar Apr 03 '24 14:04 markjaquith