DEV Community

Discussion on: TypeScript: how do you share type definitions across multiple projects?

Collapse
 
juliang profile image
Julian Garamendy

Hi! Thanks for posting this question.

I worked in projects that shared not just type definitions, but also code in a private non registry.

I think it works well for stable libraries, but it becomes annoying when the shared code (including type definitions) keeps changing.

For that we looked into yarn workspaces and lerna and planning to move the related projects to a single repository.

I'm curious to know what other teams do.

Collapse
 
room_js profile image
JavaScript Room

Thanks for the great feedback! Lerna could be an option actually, but also not that nice, as for me... I think it's a good point to improve about TS ecosystem. Since the popularity of TS grows, the problem will become more painful. We really need to find some good solution for this.