Current behavior: The adapter uses !('instances' in rawModuleRef) to distinguish between our DefaultModuleRef/NestJsModuleRef and NestJS's native ModuleRef. This relies on an implementation detail (the private instances property) which I believe is fragile.
Using something like instanceof checks could be a better alternative because, it would be more maintainable and explicit.
Current code works but this could improve maintainability
Current behavior: The adapter uses
!('instances' in rawModuleRef)to distinguish between ourDefaultModuleRef/NestJsModuleRefand NestJS's nativeModuleRef. This relies on an implementation detail (the private instances property) which I believe is fragile.Using something like
instanceofchecks could be a better alternative because, it would be more maintainable and explicit.Current code works but this could improve maintainability