mongoose-tsgen
Advanced tools
Comparing version 8.2.1 to 8.2.2
{ | ||
"name": "mongoose-tsgen", | ||
"description": "A Typescript interface generator for Mongoose that works out of the box.", | ||
"version": "8.2.1", | ||
"version": "8.2.2", | ||
"author": "Francesco Virga @francescov1", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -87,7 +87,7 @@ # mongoose-tsgen | ||
import mongoose from "mongoose"; | ||
import { UserDocument, UserModel, UserQueries, UserSchema } from "../interfaces/mongoose.gen.ts"; | ||
import { UserDocument, UserModel, UserSchema } from "../interfaces/mongoose.gen.ts"; | ||
const UserSchema: UserSchema = new Schema(...); | ||
export const User: UserModel = mongoose.model<UserDocument, UserModel, UserQueries>("User", UserSchema); | ||
export const User: UserModel = mongoose.model<UserDocument, UserModel>("User", UserSchema); | ||
export default User; | ||
@@ -214,3 +214,3 @@ ``` | ||
import mongoose, { Schema } from "mongoose"; | ||
import { UserDocument, UserModel, UserSchema, UserQueries, UserObject } from "../interfaces/mongoose.gen.ts"; | ||
import { UserDocument, UserModel, UserSchema, UserObject } from "../interfaces/mongoose.gen.ts"; | ||
@@ -277,3 +277,3 @@ // UserSchema type | ||
export const User = mongoose.model<UserDocument, UserModel, UserQueries>("User", UserSchema); | ||
export const User = mongoose.model<UserDocument, UserModel>("User", UserSchema); | ||
export default User; | ||
@@ -303,3 +303,3 @@ ``` | ||
export type UserQueries = { | ||
populateFriends: <Q extends mongoose.Query<any, UserDocument, any>>(this: Q) => Q; | ||
populateFriends: () => mongoose.Query<any, UserDocument, UserQueries> & UserQueries; | ||
} | ||
@@ -306,0 +306,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76750