|
|
|
|
|
by Lutger
313 days ago
|
|
That is useful, but you can achieve a similar benefit if you manage to spec out your api with openapi, and then generate the typescript api client. A lot of web frameworks make it easy to generate openapi spec from code. The maintenance burden shifts from hand syncing types, to setting up and maintaining the often quite complex codegen steps. Once you have it configured and working smoothly, it is a nice system and often worth it in my experience. The biggest benefit is not the productivity increase when creating new types, but the overall reliability and ease of changing stuff around that already exists. |
|
I’ve been doing this for a long time and have never once “shared code between front end and back end” but sharing types between languages is the sweet spot.