From 0fb9778dad7adad691af705d2a7e5be66b5c9fba Mon Sep 17 00:00:00 2001 From: Wayou Liu Date: Thu, 16 Jul 2020 09:43:14 +0800 Subject: [PATCH 1/3] fix #5093 --- .../microservices/module/interfaces/clients-module.interface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/microservices/module/interfaces/clients-module.interface.ts b/packages/microservices/module/interfaces/clients-module.interface.ts index 4918cdf6ece..2c911f6c729 100644 --- a/packages/microservices/module/interfaces/clients-module.interface.ts +++ b/packages/microservices/module/interfaces/clients-module.interface.ts @@ -2,7 +2,7 @@ import { ClientOptions } from '../../interfaces'; import { Type, Provider, ModuleMetadata } from '@nestjs/common/interfaces'; export type ClientProviderOptions = ClientOptions & { - name: string; + name: string | Symbol; }; export type ClientsModuleOptions = Array; From 7e9fcc231d1521f99cd9f3a6f9055004a011f77f Mon Sep 17 00:00:00 2001 From: Wayou Liu Date: Thu, 16 Jul 2020 10:18:47 +0800 Subject: [PATCH 2/3] correct the type --- .../microservices/module/interfaces/clients-module.interface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/microservices/module/interfaces/clients-module.interface.ts b/packages/microservices/module/interfaces/clients-module.interface.ts index 2c911f6c729..1853afa5278 100644 --- a/packages/microservices/module/interfaces/clients-module.interface.ts +++ b/packages/microservices/module/interfaces/clients-module.interface.ts @@ -2,7 +2,7 @@ import { ClientOptions } from '../../interfaces'; import { Type, Provider, ModuleMetadata } from '@nestjs/common/interfaces'; export type ClientProviderOptions = ClientOptions & { - name: string | Symbol; + name: string | symbol; }; export type ClientsModuleOptions = Array; From 9f80222fdcc47c2995bdb5afbe6a5f8a8dae2384 Mon Sep 17 00:00:00 2001 From: Wayou Liu Date: Thu, 16 Jul 2020 17:07:18 +0800 Subject: [PATCH 3/3] correct the type for `name` in another location --- .../microservices/module/interfaces/clients-module.interface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/microservices/module/interfaces/clients-module.interface.ts b/packages/microservices/module/interfaces/clients-module.interface.ts index 1853afa5278..2fab5d6d7e5 100644 --- a/packages/microservices/module/interfaces/clients-module.interface.ts +++ b/packages/microservices/module/interfaces/clients-module.interface.ts @@ -18,7 +18,7 @@ export interface ClientsProviderAsyncOptions useFactory?: (...args: any[]) => Promise | ClientOptions; inject?: any[]; extraProviders?: Provider[]; - name: string; + name: string | symbol; } export type ClientsModuleAsyncOptions = Array;