Skip to content

Fragile type detection for ModuleRef distinction #90

@VikramAditya33

Description

@VikramAditya33

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions