DEV Community

Discussion on: Advanced NestJS: How to build completely dynamic NestJS modules

Collapse
gimyboya profile image
gimyboya

In the section about Supporting Multiple Async Options Providers Techniques, in the first block of code, I think there a slight mistake in the code.

This part:

public static registerAsync(connectOptions: MassiveConnectAsyncOptions): DynamicModule {
    return {
      module: MassivconnectOptions.imports || [],eModule,
      imports:
      providers: [this.createConnectProviders(connectOptions)],
    };
  }

should be:

public static registerAsync(connectOptions: MassiveConnectAsyncOptions): DynamicModule {
    return {
      module: MassiveModule,
      imports: MassivconnectOptions.imports || [],
      providers: [this.createConnectProviders(connectOptions)],
    };
  }
Collapse
johnbiundo profile image
John Biundo Author

Good catch! Thanks for reporting!