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

Typescript support in interactive tutorial and API docs #851

Open
opensas opened this issue Jun 24, 2021 · 0 comments
Open

Typescript support in interactive tutorial and API docs #851

opensas opened this issue Jun 24, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@opensas
Copy link

opensas commented Jun 24, 2021

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. For example: I'm always frustrated when [...]

Svelte officially supports TypeScript since july 2020, nevertheless this is not reflected in the interactive tutorial nor in the API docs examples.

Describe the solution you'd like

Whenever there svelte/js code there should be an alternative to also see the corresponding svelte/ts version of it.

A button toggle button could be added, like what you can see now in, for example, lit homepage

image

It could start with the JavaScript version, to make it really clear that Svelte is not forcing you to use TypeScript in any way, but the toggle button will at the same time convey the idea that TypeScript is a first class citizen in Svelte.

How important is this feature to you?
Sometimes I have to goolge around to see how to do something with TypeScript (mainly how to correctly type it), it would be easier if I could just go to the tutorial / API docs and copy paste from the example. It would also be used as a reference for correctly working with TypeScript.

Additional context
It would be great if the REPL could also support TypeScript. There was an issue for that but I couln't find it.

@opensas opensas changed the title Typescript examples in interactive tutorial and API docs Typescript support in interactive tutorial and API docs Jun 24, 2021
@benmccann benmccann transferred this issue from sveltejs/svelte Dec 15, 2021
@benmccann benmccann added the enhancement New feature or request label Dec 15, 2021
@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
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants