-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong generic type for findAsync method #57
Comments
@dremchee I believe |
I mean the |
I just encountered this. @dremchee is right. // CURRENT BEHAVIOUR
const cursor = db.findAsync({ id: { $in: someArray}}(; // Cursor<T[]>
const result = await cursor.execAsync;() // Document<T[]>
result[0]._id // Should be a valid property but isn't showing up
result._id // Shouldn't be a valid property but is showing up
// EXPECTED BEHAVIOUR
const cursor = db.findAsync({ id: { $in: someArray}}(; // Cursor<T[]>
const result = await cursor.execAsync;() // Document<T>[]
result[0]._id // each row has an _id, does it now? |
nedb/index.d.ts
Line 91 in 68279cc
I think it should be like this
Document<T>[]
instead ofT[]
The text was updated successfully, but these errors were encountered: