Open treeform opened 2 years ago
Recently I have been trying to write/find a solution to tie a backend (typescript, TS) and frontend (TS) together. I've found a decent stack to achieve this, (ts, express, trpc, svelte/vuejs/react). This is all to provide types from the backend to the consumer.
However I have been tainted by nim, every time I write something on this TS backend I think in nim and then can't help but wonder if the thing I am doing would just be easier in nim.
Watching this +1
Are there plans to support TS definitions?
just as a side note (and to check my thinking)
first thoughts from that
I appreciate that this is genny is a dynamically linked generator and what I've described is over rest but I don't think it is too off. Generate TS bindings -> pass bindings through a query wrapper.
If TS is a supported target by nim it might open up a huge audience for BE dev. Untyped languages are not great in the backend and AFAICS (opinion) other languages go/rust don't have a truely elegant solution to target the frontend
ps - some of this is probably wrong, I'm just airing thoughts also to go back to, thanks if you actually read this
Generating TypeScript bindings is not a bad idea if some one wants to do it. But only server side.
Generating rest APIs, anything that goes over HTTP or network is not were we want to take genny.
If you need an API generator (which could be really cool) you can make your own library or fork genny.
JavaScript is very popular and is similar to python. There is node.js and Deno. Node.js is way more popular abut Deno is new an exciting. It does not look like Deno has its FFI flushed out yet.