diff --git a/types/mongoose-autopopulate/index.d.ts b/types/mongoose-autopopulate/index.d.ts new file mode 100644 index 0000000000..41f0703af3 --- /dev/null +++ b/types/mongoose-autopopulate/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for mongoose-autopopulate 0.10 +// Project: https://github.com/mongodb-js/mongoose-autopopulate +// Definitions by: Ranjit Singh +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +import { Schema } from 'mongoose'; + +declare function mongooseAutoPopulate(schema: Schema): void; + +export default mongooseAutoPopulate; diff --git a/types/mongoose-autopopulate/mongoose-autopopulate-tests.ts b/types/mongoose-autopopulate/mongoose-autopopulate-tests.ts new file mode 100644 index 0000000000..5b80482e08 --- /dev/null +++ b/types/mongoose-autopopulate/mongoose-autopopulate-tests.ts @@ -0,0 +1,8 @@ +import { Schema } from 'mongoose'; +import mongooseAutoPopulate from 'mongoose-autopopulate'; + +const schema = new Schema({ + test: { type: String }, +}); + +schema.plugin(mongooseAutoPopulate); diff --git a/types/mongoose-autopopulate/tsconfig.json b/types/mongoose-autopopulate/tsconfig.json new file mode 100644 index 0000000000..517d8b1dcd --- /dev/null +++ b/types/mongoose-autopopulate/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mongoose-autopopulate-tests.ts" + ] +} diff --git a/types/mongoose-autopopulate/tslint.json b/types/mongoose-autopopulate/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mongoose-autopopulate/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }