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 @const support to preprocessed scripting languages #567

Open
LeoDog896 opened this issue Dec 16, 2022 · 0 comments
Open

Add @const support to preprocessed scripting languages #567

LeoDog896 opened this issue Dec 16, 2022 · 0 comments

Comments

@LeoDog896
Copy link

LeoDog896 commented Dec 16, 2022

In svelte, you can use {@const variable = element} to declare variables. Unfortunately, this lacks typescript type support, for example:

{@const var = someGenericMethod<string>()}

Maybe a configuration option for using typescript / coffeescript (not sure how that would look) notation for @const statements, and possibly any others that may also do this.

or, what would probably work better is, with the template tag, specify what script it should use:

<template lang="pug" script="typescript">
    <!-- stuff goes here -->
</template>
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

1 participant