mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
NeDB: projection is not T (#47460)
`projection` is a MongoDB-style projection.
Possible values include `{_id: 0}` and `{'foo.bar': 1}`. This does not mean that `T` will be an object that has either of those properties nor that their are numbers. `1` means to include the property in the return value and `0` means to leave the property out.
This commit is contained in:
parent
15ea8d2115
commit
7f3c3f89ae
6
types/nedb/index.d.ts
vendored
6
types/nedb/index.d.ts
vendored
@ -96,8 +96,8 @@ declare class Nedb<G = any> extends EventEmitter {
|
||||
* @param query MongoDB-style query
|
||||
* @param projection MongoDB-style projection
|
||||
*/
|
||||
find<T extends G>(query: any, projection: T, callback: (err: Error | null, documents: T[]) => void): void;
|
||||
find<T extends G>(query: any, projection?: T): Nedb.Cursor<T>;
|
||||
find<T extends G>(query: any, projection: any, callback: (err: Error | null, documents: T[]) => void): void;
|
||||
find<T extends G>(query: any, projection?: any): Nedb.Cursor<T>;
|
||||
|
||||
/**
|
||||
* Find all documents matching the query
|
||||
@ -111,7 +111,7 @@ declare class Nedb<G = any> extends EventEmitter {
|
||||
* @param query MongoDB-style query
|
||||
* @param projection MongoDB-style projection
|
||||
*/
|
||||
findOne<T extends G>(query: any, projection: T, callback: (err: Error | null, document: T) => void): void;
|
||||
findOne<T extends G>(query: any, projection: any, callback: (err: Error | null, document: T) => void): void;
|
||||
|
||||
/**
|
||||
* Find one document matching the query
|
||||
|
||||
Loading…
Reference in New Issue
Block a user