Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 590 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 590 Bytes

mongoose-types

Opinionated, simplified types for mongoose.js

Usage

  1. install this library

     yarn add @huddo/mongoose-types
     npm i @huddo/mongoose-types
    
  2. delete the mongooose types

    See the official Mongoose documentation

     {
       "postinstall": "rm ./node_modules/mongoose/types"
     }
    
  3. Import these types

    Open your tsconfig.json file and add typeRoots:

     "compilerOptions": {
       "typeRoots": ["node_modules/@types", "node_modules/@huddo"],
     }