fix(core): add abstract option to resolve method

This commit is contained in:
gangajogur
2020-11-17 21:40:58 +10:00
parent f2ca8070e0
commit 4f694e213c

View File

@@ -3,7 +3,7 @@ import {
Logger,
LoggerService,
LogLevel,
ShutdownSignal,
ShutdownSignal
} from '@nestjs/common';
import { Abstract, Scope } from '@nestjs/common/interfaces';
import { Type } from '@nestjs/common/interfaces/type.interface';
@@ -19,7 +19,7 @@ import {
callBeforeAppShutdownHook,
callModuleBootstrapHook,
callModuleDestroyHook,
callModuleInitHook,
callModuleInitHook
} from './hooks';
import { ContextId } from './injector';
import { NestContainer } from './injector/container';
@@ -79,7 +79,7 @@ export class NestApplicationContext implements INestApplicationContext {
}
public resolve<TInput = any, TResult = TInput>(
typeOrToken: Type<TInput> | string | symbol,
typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol,
contextId = createContextId(),
options: { strict: boolean } = { strict: false },
): Promise<TResult> {