You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It almost encourages a Service layer architecture where Rescript is your "app", and the .svelte files are just the messy outer interface, which will always be chaotic because you've got JS/CSS/HTML/preprocessors/postprocessors/bundlers/etc. reference Rails is Not Your Application
Now the part that isn't type-checked is the boundary between your display layer and its service layer. You can keep this interface to a minimum by using subscribe() to get data out and simple functions with simple arg types to get data in, like you did. An extra benefit of this discipline is that you can cleanly test it separate from the interface.
If rescript is ever an option is .svelte files then it will be easy conversion.
I tried using typescript in the svelte files and I'm not sure it got me anywhere. Every file needed a .d.ts file and chances are you might not reuse those definitions often so it might end up being one function call per definition, which just means you moved your bugs to the .d.ts files.
It almost encourages a Service layer architecture where Rescript is your "app", and the .svelte files are just the messy outer interface, which will always be chaotic because you've got JS/CSS/HTML/preprocessors/postprocessors/bundlers/etc. reference Rails is Not Your Application
Now the part that isn't type-checked is the boundary between your display layer and its service layer. You can keep this interface to a minimum by using subscribe() to get data out and simple functions with simple arg types to get data in, like you did. An extra benefit of this discipline is that you can cleanly test it separate from the interface.
If rescript is ever an option is .svelte files then it will be easy conversion.
I tried using typescript in the svelte files and I'm not sure it got me anywhere. Every file needed a .d.ts file and chances are you might not reuse those definitions often so it might end up being one function call per definition, which just means you moved your bugs to the .d.ts files.
And typescript looks awful
The text was updated successfully, but these errors were encountered: