re: TypeScript: how do you share type definitions across multiple projects? VIEW POST

re: Thank you for the extensive feedback! As I see, there is no perfect solution so far... I had to deal with git submodules in one of the previous pro...

I consider the mono-repo approach to provide the least friction when it comes to fast changing codebases. Throw in a CI solution, automated tests+typescript and you end up with a very easy to maintain workflow.

This is especially true for full-stack TS projects, where sharing types between the client+server-side code can create an extremely "refactor-able" code base.

I also should of mentioned you could use dedicated mono-repo tools like lerna even for smaller full-stack projects to help share code. Generally though, if you package code (using npm or other systems), you have to deal with versioning pains.

code of conduct - report abuse