Added some new files and extended the existing code. Didn't change any logic in the old register() method or in any other file.
Couldn't come up with a better way of the initialization of registerAsync() without changing existing code. It is only a slight inconvenience to provide the name of the service (e.g. "HERO_SERVICE") twice. I added a new example to the readme.md.
Added e2e tests for the new registerAsync() method and tried to reduce duplicated code in the test section as much as possible.
Implemented "Asynchronous Module Initialization" with the help of this article: https://dev.to/nestjs/advanced-nestjs-how-to-build-completely-dynamic-nestjs-modules-1370
Added some new files and extended the existing code. Didn't change any logic in the old
register()
method or in any other file. Couldn't come up with a better way of the initialization ofregisterAsync()
without changing existing code. It is only a slight inconvenience to provide the name of the service (e.g. "HERO_SERVICE") twice. I added a new example to the readme.md.Added e2e tests for the new
registerAsync()
method and tried to reduce duplicated code in the test section as much as possible.