mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Merge pull request #17209 from twoeo/patch-1
@types/mongodb: change Default to any
This commit is contained in:
Vendored
+1
-1
@@ -994,7 +994,7 @@ export interface WriteOpResult {
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~resultCallback
|
||||
export type CursorResult = any | void | boolean;
|
||||
|
||||
type Default = { [key: string]: any };
|
||||
type Default = any;
|
||||
|
||||
//http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html
|
||||
export class Cursor<T = Default> extends Readable {
|
||||
|
||||
@@ -85,7 +85,7 @@ let options = {
|
||||
let cursor: mongodb.Cursor<bag> = collection.find<bag>({color: 'black'})
|
||||
cursor.toArray(function (err,r) { r[0].cost} );
|
||||
cursor.forEach(function (bag ) { bag.color }, () => {});
|
||||
collection.findOne({ color: 'white' }).then(() => { })
|
||||
collection.findOne({ color: 'white' }).then(b => { let _b:bag = b; })
|
||||
collection.findOne<bag>({ color: 'white' }).then(b => { b.cost; })
|
||||
}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user