Skip to content

Commit 910e089

Browse files
Merge pull request nestjs#278 from patrickhousley/fix/app-context-symbol
fix(@nestjs/core) application context, support symbol
2 parents b7268e1 + fece41a commit 910e089

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/nest-application-context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export class NestApplicationContext implements INestApplicationContext {
2626
: null;
2727
}
2828

29-
public get<T>(metatypeOrToken: Metatype<T> | string): T {
29+
public get<T>(metatypeOrToken: Metatype<T> | string | symbol): T {
3030
return this.findInstanceByPrototypeOrToken<T>(metatypeOrToken);
3131
}
3232

33-
private findInstanceByPrototypeOrToken<T>(metatypeOrToken: Metatype<T> | string) {
33+
private findInstanceByPrototypeOrToken<T>(metatypeOrToken: Metatype<T> | string | symbol) {
3434
const dependencies = new Map([
3535
...this.contextModule.components,
3636
...this.contextModule.routes,

0 commit comments

Comments
 (0)