I have some 5 years experience in developing HTTP services using Node, but still I consider myself a newbie in Nest :/ I'm having maybe a rather simple double about the NestJs module system and how it's intended to be understood:
- where should we define the public interface of a module?
aaa/index.tsXaaa/aaa.module.ts? - should we depend modules on other modules or on individual services of other modules?
providersXimport? - would this choice have an impact on how Next DI engine creates the injectables?
- how can we address transitive dependencies on module import, when testing?
- on
*.module.spec.tsfiles, should we use the same approach regardingprovidersXimportused on their correspondent*.spec.tsfiles? - how can we mock transitive dependencies (ie: moduleA depends on moduleB, which depends on moduleC)?
"you may consider the exported providers from a module as the module's public interface"
"(imports) the list of imported modules that export the providers which are required in this module"
https://docs.nestjs.com/modules
then i'm going to question this later then