I am writing a web service and I want to build out types that can be used by the client which is another repository. So, if I have something like:
export interface Device {name: string,address: number}
And I return this "shape" in a json payload, but I'd like to share the type definition with the client, what is the best way to do that? Do I need to create a new repository and publish a d.ts file as an npm package, then import that from the client? Or is there a better way?