I'm trying to build up my first project with Typescript (and React/Redux) and struggling to pass my custom types between multiple files: like making my action types available to action creators, reducer, and each component dispatching some of those actions.
So, what's the proper approach here:
- declare all the custom types in a common file and import that wherever necessary?
- declare custom types in their related files and make the web of imports/exports?
- some other option that didn't yet cross my mind?
I understand that this question may be closed as rather opinionated, but I failed to find the answer neither in typescriptlang.org nor in the other resources (including SO topics).