These are chat archives for Automattic/mongoose

8th
Aug 2016
Pier-Luc Gagnon
@Nepoxx
Aug 08 2016 15:20
Is anyone here using Mongoose with Typescript?
Vlado Tesanovic
@vladotesanovic
Aug 08 2016 16:06
@Nepoxx :+1:
Pier-Luc Gagnon
@Nepoxx
Aug 08 2016 16:10
@vladotesanovic do you know what's the type of the response when you do an .update()? I thought it was mongoose.BulkWriteResult, but it doesn't have n
Vlado Tesanovic
@vladotesanovic
Aug 08 2016 16:10
let me check
@Nepoxx just number: affectedRows: number
Pier-Luc Gagnon
@Nepoxx
Aug 08 2016 16:15
Hmm, Query.update(), sorry not Model.update
(so MyModel.where({...}).update()), it results a {n: number, nModified: number, ...}, but I can't find that definition
Vlado Tesanovic
@vladotesanovic
Aug 08 2016 16:18
sec
Pier-Luc Gagnon
@Nepoxx
Aug 08 2016 17:20
well if you get a native mongodb response, then it's different isn't