diff --git a/examples/mongodb-crud/backend/src/models/Global.ts b/examples/mongodb-crud/backend/src/models/Global.ts index 7804839..d86f33a 100644 --- a/examples/mongodb-crud/backend/src/models/Global.ts +++ b/examples/mongodb-crud/backend/src/models/Global.ts @@ -1,4 +1,4 @@ -import { Collection, Db, MongoClient } from "mongodb"; +import { Collection, Db, MongoClient, OptionalId } from "mongodb"; import { Logger } from "tsrpc"; import { DbPost } from "../shared/db/DbPost"; import { BackConfig } from "./BackConfig"; @@ -14,7 +14,7 @@ export class Global { this.db = client.db(); } - static collection(col: T): Collection { + static collection(col: T): Collection> { return this.db.collection(col); }