@nestjs/common/interfaces#Provider TypeScript Examples

The following examples show how to use @nestjs/common/interfaces#Provider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: service-bus-setup.ts    From pebula-node with MIT License 6 votes vote down vote up
export function createServiceBusModule(...providers: Provider[]) {
  return ServiceBusModule.register({
    servers: {
      useFactory: createServerOptions,
      inject: [ConfigService],
    },
    clients: [
      {
        logger: NoopLogger.shared, // createLogger('SbClient: default'),
      },
    ],
    providers,
  });
}
Example #2
Source File: module.d.ts    From nest-jaeger with MIT License 5 votes vote down vote up
addInjectable<T extends Injectable>(injectable: Provider, host?: Type<T>): string;
Example #3
Source File: module.d.ts    From nest-jaeger with MIT License 5 votes vote down vote up
addProvider(provider: Provider): string;
Example #4
Source File: module.d.ts    From nest-jaeger with MIT License 5 votes vote down vote up
isCustomProvider(provider: Provider): provider is ClassProvider | FactoryProvider | ValueProvider | ExistingProvider;
Example #5
Source File: module.d.ts    From nest-jaeger with MIT License 5 votes vote down vote up
addExportedProvider(provider: (Provider & ProviderName) | string | symbol | DynamicModule): Set<string | symbol>;
Example #6
Source File: module.ts    From pebula-node with MIT License 5 votes vote down vote up
addServiceBusModule(...providers: Provider[]): Pick<TestModuleFactory, 'compile' | 'addMetadata'> {
    const serviceBusModule = createServiceBusModule(...providers);
    this.moduleMetadata.imports.push(serviceBusModule);
    return this;
  }