Open gavinvaske opened 2 months ago
Currently the UI and API are both utilzing typescript.
Many times, there are going to be types that that UI and API both need to share.
The naive approach would be to create a type in either the API or UI and then import that type in the opposite
However, that tightly couples the UI and API, and I'd like to avoid that if at all possible.
Typically in these situations, utilizing a 'middleman' or interface is the answer ("a shared types module")
In this way, the API or UI only ever imports types from itself or the interface?
Idk, there's probably a bunch of approaches, to close this issue, investigate and document all potential options and make a decision.
Description
Currently the UI and API are both utilzing typescript.
Many times, there are going to be types that that UI and API both need to share.
The naive approach would be to create a type in either the API or UI and then import that type in the opposite
However, that tightly couples the UI and API, and I'd like to avoid that if at all possible.
Typically in these situations, utilizing a 'middleman' or interface is the answer ("a shared types module")
In this way, the API or UI only ever imports types from itself or the interface?
Idk, there's probably a bunch of approaches, to close this issue, investigate and document all potential options and make a decision.