Add @const support to preprocessed scripting languages
LeoDog896 opened this issue · 0 comments
LeoDog896 commented
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>