From 141e4d6a7bb62fd5eef137cf5f7ab861164dcb1d Mon Sep 17 00:00:00 2001 From: "King.W" Date: Thu, 15 Jun 2017 19:36:15 +0800 Subject: [PATCH] Update mongodb-tests.ts mongodb-tests.ts --- types/mongodb/mongodb-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index e4c7f3bd8a..549537812d 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -85,7 +85,7 @@ let options = { let cursor: mongodb.Cursor = collection.find({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({ color: 'white' }).then(b => { b.cost; }) } {