We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report a [bug]
The Mongoose#model definition Type differs from the Mongoose#model method
skipInit
model()
Mongoose#model definition Type SkipInit is found on the Mongoose#model mongoose/index.d.ts Lines 123 to 129 in 17fcd47 export function model<T>(name: string, schema?: Schema<T, any, any> | Schema<T & Document, any, any>, collection?: string, skipInit?: boolean): Model<T>; export function model<T, U, TQueryHelpers = {}>( name: string, schema?: Schema<T, U, TQueryHelpers>, collection?: string, skipInit?: boolean ): U; Yet doesn't exisit on the Mongoose#model definition mongoose/lib/index.js Lines 454 to 461 in dbb7ed6 * @param {String|Function} name model name or class extending Model * @param {Schema} [schema] the schema to use. * @param {String} [collection] name (optional, inferred from model name) * @return {Model} The model associated with `name`. Mongoose will create the model if it doesn't already exist. * @api public */ Mongoose.prototype.model = function(name, schema, collection, options) {
SkipInit is found on the Mongoose#model
mongoose/index.d.ts
Lines 123 to 129 in 17fcd47
mongoose/lib/index.js
Lines 454 to 461 in dbb7ed6
I also found the same issue below. Though I haven't inspected the function it's self.
Connection#model definition Type SkipInit is also found on the Connection#model Type mongoose/index.d.ts Lines 373 to 380 in 3aeb86a /** Defines or retrieves a model. */ model<T>(name: string, schema?: Schema<any>, collection?: string): Model<T>; model<T, U, TQueryHelpers = {}>( name: string, schema?: Schema<T, U, TQueryHelpers>, collection?: string, skipInit?: boolean ): U; Yet Doesn't exist on the Connection#model definition mongoose/lib/connection.js Lines 1056 to 1066 in 3aeb86a * @param {String|Function} name the model name or class extending Model * @param {Schema} [schema] a schema. necessary when defining a model * @param {String} [collection] name of mongodb collection (optional) if not given it will be induced from model name * @param {Object} [options] * @param {Boolean} [options.overwriteModels=false] If true, overwrite existing models with the same name to avoid `OverwriteModelError` * @see Mongoose#model #index_Mongoose-model * @return {Model} The compiled model * @api public */ Connection.prototype.model = function(name, schema, collection, options) {
SkipInit is also found on the Connection#model Type
Lines 373 to 380 in 3aeb86a
mongoose/lib/connection.js
Lines 1056 to 1066 in 3aeb86a
The text was updated successfully, but these errors were encountered:
87bc411
vkarpov15
No branches or pull requests
Report a [bug]
The Mongoose#model definition Type differs from the Mongoose#model method
skipInit
parameter formodel()
#4625I also found the same issue below. Though I haven't inspected the function it's self.
The text was updated successfully, but these errors were encountered: