rescript-compiler
rescript-compiler copied to clipboard
Add support for Svelte
Svelte is getting popular among front end development, I believe adding support for it in rescript would be awesome.
Could you elaborate what kind of support do you expect?
-
Ability to write type-safe rescript within the
script
tag, right now we can import the generatedjs
but feels unatural and its also not type safe when using the functions ason:click
handler. -
related to the first request, bindings for common HTML Events Handlers should be written so that something like
<button on:click={clickHandler} />
its type safe i.e. clickHandler should have the correct type for "on:click" -
Svelte uses
$:
to identify reactive blocks of code so I guess its also necessary to add support for that syntax
Probably a .res
file with the same structure as .svelte
files can be compiled to a javascript .svelte
file.
Save to say that this will not be on our priority list. Most focus will go towards an improved version of our JSX, including a new version of rescript-react
.