DEV Community

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

Collapse
 
room_js profile image
JavaScript Room

Hi! That's a nice one, thanks for sharing it! I think it might be useful in some cases, but what concerns me here is that you have to reproduce the exact folder's structure every time in order to make it work. And moreover, you have to keep all of your projects consuming the types within the same File System, which is not the case for most of the modern apps taking place on different "machines" in the cloud.

Collapse
 
travisvalenti profile image
Travis Valenti

Both are good points. My intuition had told me that when deploying the applications, the adjacent projects wouldn't need to be copied alongside, as they would be compiled into the current project. I may be incorrect though.
Maybe in a few weeks when I'm dozens of hours deep into a project using Project References, I'll know a little more.

Thread Thread
 
room_js profile image
JavaScript Room

Yeah, definitely. It's always difficult to be sure of something before you spent hours on it. Please feel free to share the results of your journey!