Skip to content

Commit

Permalink
Fix typing for getQueryName function
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrSpeck committed Aug 8, 2024
1 parent 4ad271b commit 38d2160
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query-bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export class QueryBus<QueryBase extends IQuery = IQuery>
this._publisher = new DefaultQueryPubSub<QueryBase>(this.subject$);
}

private getQueryName(query: Type<QueryBase>): string {
private getQueryName(query: QueryBase): string {
const { constructor } = Object.getPrototypeOf(query);
return constructor.name;
return constructor.name as string;
}
}

0 comments on commit 38d2160

Please sign in to comment.