Using mapreduce with Mongoose, unable to find the emit function
I am trying to create a mapreduce function using the example on the Mongoose website located here . This app is built with TypeScript and node.js.
This example uses an emit function which I cannot find. I keep getting an error indicating that the function could not be found. I added type references at the top of the file for Mongoose and Mongodb, but that didn't work either:
///<reference path="../../../node_modules/@types/mongodb/index.d.ts" />
///<reference path="../../../node_modules/@types/mongoose/index.d.ts" />
I just would like to know where my problem is. In the examples I used, I didn't need to add this vice. Of course I'm using TypeScript for my case and the examples don't use TypeScript, but I think this will work anyway.
+3
source to share
No one has answered this question yet
Check out similar questions: