Comment by tossandthrow
Comment by tossandthrow 11 days ago
And this is definitely a problem.
Had I had the opportunity to choose a language across the entire stack with mature wide adopted frameworks and libraries, I had done it.
Had there been something line Rust, Go, Java, C#, etc. that would work end to end, that would have been amazing.
In practice, even the weak safety typescript provides catches so many bugs before they hit production that it is indeed worth it - I have more than 140k LOCs of Typescript in production, and that would not be manageable without types.
And to be just a tad pedantic: you have JS in production; your TS is only in dev.
It's not that you can't; it's that you choose not to (and yes, generally for good and valid reasons). There are end-to-end solutions for C# (e.g. Blazor), for example, that are perfectly fine depending on your use case (not great for all use cases). Fable is another example using F#[1]There are also libraries like Bootsharp[2] that are doing interesting things, IMO, and has some of the same energy as OP's project (moving the typing and logic into a runtime that supports runtime static types and interfacing minimally with JS)
[0] https://google.github.io/styleguide/jsguide.html#jsdoc
[1] https://fable.io/docs/
[2] https://sharp.elringus.com/