feat(dbs): use constructor for memory db

This commit is contained in:
2023-10-20 08:37:35 +00:00
parent 954c48296b
commit e6b9c5ce61
6 changed files with 26 additions and 9 deletions

View File

@@ -55,7 +55,7 @@ export class MemoryStorage<TSchema extends Document = Document> extends Storage<
}
async find(filter?: Filter<WithId<TSchema>>, options?: Options): Promise<WithId<TSchema>[]> {
let cursor = new Query(filter ?? {}).find(Array.from(this.#documents.values()));
let cursor = new Query(filter ?? {}).find<TSchema>(Array.from(this.#documents.values()));
if (options !== undefined) {
cursor = addOptions(cursor, options);
}