You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With new mongodb library, compilation fails because TSchema is default one, we used <unknown> cast to prevent the compilation failure but we should implement a TSchema for our object
src/mongodb.ts:321:7 - error TS2769: No overload matches this call.
The last overload gave the following error.
Type 'string' is not assignable to type 'Condition<ObjectId>'.
321 _id: uid
~~~
../../node_modules/mongodb/mongodb.d.ts:5858:5
5858 _id: InferIdType<TSchema>;
~~~
The expected type comes from property '_id' which is declared here on type 'Filter<Document>'
../../node_modules/mongodb/mongodb.d.ts:1466:5
1466 findOne<T = TSchema>(filter: Filter<TSchema>, options?: FindOptions, callback?: Callback<T | null>): void;
~~~~~~~
The last overload is declared here.
The text was updated successfully, but these errors were encountered:
Describe the bug
With new mongodb library, compilation fails because TSchema is default one, we used
<unknown>
cast to prevent the compilation failure but we should implement a TSchema for our objectThe text was updated successfully, but these errors were encountered: