Skip to content

Mongoose ConnectOptions Type Seems To Have REALLY Changed #30

@giacomo9999

Description

@giacomo9999

In app.ts, the lines below need to be removed:

const options = { useNewUrlParser: true, useUnifiedTopology: true }
mongoose.set("useFindAndModify", false)

Recent releases of Mongoose seem to set those options automatically. I am new to using TypeScript with Mongoose, but the new ConnectOptions type definition is (apparently) something very different than what it used to be. If the above lines are not removed, TypeScript will yell at you (in its own confusing way) that the ConnectOptions type does not include a "useNewUrlParser" property.

If the above lines are removed from app.ts, everything seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions