[mongoose-autopopulate] added new type definitions (#41743)

This commit is contained in:
Ranjit Singh
2020-01-20 18:50:40 -05:00
committed by Eli Barzilay
parent 2b3ef8b232
commit b5a1267b5e
4 changed files with 43 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// Type definitions for mongoose-autopopulate 0.10
// Project: https://github.com/mongodb-js/mongoose-autopopulate
// Definitions by: Ranjit Singh <https://github.com/rann91>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
import { Schema } from 'mongoose';
declare function mongooseAutoPopulate(schema: Schema): void;
export default mongooseAutoPopulate;
@@ -0,0 +1,8 @@
import { Schema } from 'mongoose';
import mongooseAutoPopulate from 'mongoose-autopopulate';
const schema = new Schema({
test: { type: String },
});
schema.plugin(mongooseAutoPopulate);
+23
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }