Merge pull request #17209 from twoeo/patch-1

@types/mongodb: change Default to any
This commit is contained in:
Mine Starks
2017-06-15 18:00:04 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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; })
}
{