mongoose
View on npm →Issues by Rule
tjd/accurate-jsdoc Issues by File
lib/document.js 3 issues@param 'options': Object → { defaults?: boolean; skipId?: boolean; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
@param 'opts': Object → { setters?: boolean; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
@returns: String|undefined → string. JSDoc includes null/undefined but TypeScript infers the value is always present. Either the code guarantees a value, or add runtime checks.
lib/helpers/document/applyTimestamps.js 3 issues@param 'options': Object → { isUpdate?: boolean; currentTime?: Function; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
@param 'options': Object → { isUpdate?: boolean; currentTime?: Function; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
@param 'options': Object → { isUpdate?: boolean; currentTime?: Function; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
lib/helpers/model/applyHooks.js 1 issue@returns: { childModel: Model | typeof Subdocument, curType: Schema... → { childModel: any; curType: SchemaType; }. JSDoc declares union but TypeScript infers object.
lib/helpers/populate/assignVals.js 1 issue@param 'populateOptions': Object → { transform?: Function; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
lib/helpers/query/castUpdate.js 1 issue@param 'options': Object → { strict?: string | boolean; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
lib/model.js 1 issue@param 'options': Object → { defaults?: boolean; skipId?: boolean; }. JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
lib/query.js 1 issue@param 'err': Error|undefined → Error. JSDoc includes null/undefined but TypeScript infers the value is always present. Either the code guarantees a value, or add runtime checks.
lib/schema/array.js 1 issue@param 'cast': SchemaType → { (path: string, options?: SchemaTypeOptions, instance?: .... JSDoc declares unknown but TypeScript infers object.
lib/schema/documentArray.js 1 issue@param 'init': Boolean|undefined → boolean. JSDoc includes null/undefined but TypeScript infers the value is always present. Either the code guarantees a value, or add runtime checks.
lib/types/documentArray/index.js 1 issue@returns: MongooseDocumentArray → (values: any[], path: string, doc: Document, schematype: .... JSDoc declares unknown but TypeScript infers function.
lib/virtualType.js 1 issue@param 'options': Object → { ref?: string | Function; localField?: string | Function.... JSDoc uses generic "object" but TypeScript infers a specific shape. Consider using @typedef to document the object structure.
Analyzed: 2/3/2026