MCPcopy
hub / github.com/nestjs/nest / addImport

Method addImport

packages/core/injector/container.ts:238–250  ·  view source on GitHub ↗
(
    relatedModule: Type<any> | DynamicModule,
    token: string,
  )

Source from the content-addressed store, hash-verified

236 }
237
238 public async addImport(
239 relatedModule: Type<any> | DynamicModule,
240 token: string,
241 ) {
242 if (!this.modules.has(token)) {
243 return;
244 }
245 const moduleRef = this.modules.get(token)!;
246 const { token: relatedModuleToken } =
247 await this.moduleCompiler.compile(relatedModule);
248 const related = this.modules.get(relatedModuleToken)!;
249 moduleRef.addImport(related);
250 }
251
252 public addProvider(
253 provider: Provider,

Callers 1

Calls 3

hasMethod · 0.80
getMethod · 0.65
compileMethod · 0.45

Tested by

no test coverage detected