diff --git a/src/query-bus.ts b/src/query-bus.ts index e4ba9f3a..dd7890e7 100644 --- a/src/query-bus.ts +++ b/src/query-bus.ts @@ -122,8 +122,8 @@ export class QueryBus this._publisher = new DefaultQueryPubSub(this.subject$); } - private getQueryName(query: Type): string { + private getQueryName(query: QueryBase): string { const { constructor } = Object.getPrototypeOf(query); - return constructor.name; + return constructor.name as string; } }