title: How does NestJS match the injection target and the injected instance?
body: <p>According to the NestJS official document <a href="https://docs.nestjs.com/providers#dependency-injection" rel="nofollow noreferrer">[1]</a>, it describes &quot;In Nest, thanks to TypeScript capabilities, it's extremely easy to manage dependencies because they are resolved just <strong>by type</strong>.&quot;</p>
  <p>I'm very confused of this description, because at runtime we do not have any type information of the constructor argument which is erased during the transpilation.</p>
  <p>How NestJS actually resolves the matching between the required type (class) and the actual object (instance)?</p>