Sharing installable Types?

Is anyone whether external npm or internal Nexus server publishing and consuming types? What about the conversion functions between them?

We had a convo at work around whether I should create a library that abstracts some common microservices and npm install into 2 projects, or just resign myself to copy pasta because DRY is bad in microservices.

We couldn’t find a lot of fault, however, in publish some common types and their conversions (e.g. typeToString, stringToType) to npm and consuming those between 2 github projects. It seems to be working well for one team using Go since we’re talking about core company business concepts that don’t really change much. If they did change, we’d certainly want to go update all our repos.

I know this is what made TypeScript super popular, simply installing the types.