I am trying to build a REST API server with an auto-incrementing field with Mongoose, Express, and TypeScript using the mongoose-sequence project. (This project seems like the most popular and supported of the ones out there.)
I have run npm install --save @types\mongoose-sequence
to import the types for TypeScript.
However, I can't seem to figure out how to correctly make use of it.
The code in the README says to do the following:
const AutoIncrement = require('mongoose-sequence')(mongoose);
How does that translate into TypeScript?
Can someone explain the basics to get me rolling?