I was using typescript for both forntend(Angular) and backend(Express).
So to share type definition, I was doing:
shared-type-file.ts
interface Kid{
name: string;
age: number;
}
Then npm install
it in both frontend and backend. Thus my data structure was well defined across systems and it helped me a lot.
Now if I'm switching my server to Go (maybe go-fibre) how do I obtain a similar functionality? How can I keep my data structures type-checked across the systems like that?