Skip to content

Commit ebc6e10

Browse files
committed
Merge branch 'vkarpov15/Automatticgh-12844' of github.com:Automattic/mongoose into vkarpov15/Automatticgh-12844
2 parents 023b3c0 + acc8ea9 commit ebc6e10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/schemaType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ SchemaType.prototype.index = function(options) {
463463
* will still throw MongoDB's default `E11000 duplicate key error` message.
464464
*
465465
* @param {Boolean} value
466-
* @param {String} message
466+
* @param {String} [message]
467467
* @return {SchemaType} this
468468
* @api public
469469
*/

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ declare module 'mongoose' {
309309
eachPath(fn: (path: string, type: SchemaType) => void): this;
310310

311311
/** Defines an index (most likely compound) for this schema. */
312-
index(fields: IndexDefinition, options?: Omit<IndexOptions, 'unique'> & { unique?: boolean | undefined | [true, string] }): this;
312+
index(fields: IndexDefinition, options?: Omit<IndexOptions, 'unique'> & { unique?: boolean | [true, string] }): this;
313313

314314
/**
315315
* Define a search index for this schema.

0 commit comments

Comments
 (0)