Skip to content

Commit

Permalink
refact
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad0-0ahmad committed Mar 11, 2022
1 parent 643a38d commit 2c04ac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/types/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const schema: Schema<ITest, Model<ITest, QueryHelpers>, {}, QueryHelpers> = new
endDate: Date
});

schema.query._byName = function(name: string): QueryWithHelpers<ITest[], ITest, QueryHelpers> {
schema.query._byName = function(name: string): QueryWithHelpers<any, ITest, QueryHelpers> {
return this.find({ name });
};

schema.query.byName = function(name: string): QueryWithHelpers<ITest[], ITest, QueryHelpers> {
schema.query.byName = function(name: string): QueryWithHelpers<any, ITest, QueryHelpers> {
expectError(this.notAQueryHelper());
return this._byName(name);
};
Expand Down

0 comments on commit 2c04ac9

Please sign in to comment.