ISubscription
The interface of the schema for saving subscription within the MongoAdapter.
Extends
Document
Type parameters
Type parameter | Value |
---|---|
T extends SubscriptionTypes | SubscriptionTypes |
Properties
Property | Type | Description | Overrides | Inherited from |
---|---|---|---|---|
$locals | Record <string , unknown > | Empty object that you can use for storing properties on the document. This is handy for passing data to middleware without conflicting with Mongoose internals. | Document.$locals | Document.$locals |
$op | "save" | "validate" | "remove" | A string containing the current operation that Mongoose is executing on this document. Can be null , 'save' , 'validate' , or 'remove' . | Document.$op | Document.$op |
$where | Record <string , unknown > | Set this property to add additional query filters when Mongoose saves this document and isNew is false. | Document.$where | Document.$where |
__v? | any | This documents __v. | Document.__v | Document.__v |
_id? | any | This documents _id. | Document._id | Document._id |
baseModelName? | string | If this is a discriminator model, baseModelName is the name of the base model. | Document.baseModelName | Document.baseModelName |
collection | Collection <Document > | Collection the model uses. | Document.collection | Document.collection |
db | Connection | Connection the model uses. | Document.db | Document.db |
errors? | ValidationError | Returns the current validation errors. | Document.errors | Document.errors |
id | string | - | Document.id | Document.id |
isNew | boolean | Boolean flag specifying if the document is new. | Document.isNew | Document.isNew |
nonce? | string | - | - | - |
options | SubscriptionTypeOptions [T ] | - | - | - |
schema | Schema <any , Model <any , any , any , any , any , any >, object , object , object , object , DefaultSchemaOptions , object , Document <unknown , object , FlatRecord <object >> & FlatRecord <object > & Required <object >> | The document’s schema. | Document.schema | Document.schema |
secret? | string | - | - | - |
type | T | - | - | - |
Methods
$assertPopulated()
1$assertPopulated<Paths>(path: string | string[], values?: Partial<Paths>): Omit<ISubscription<T>, keyof Paths> & Paths
Assert that a given path or paths is populated. Throws an error if not populated.
Type parameters
Type parameter | Value |
---|---|
Paths | object |
Parameters
Parameter | Type |
---|---|
path | string | string [] |
values ? | Partial <Paths > |
Returns
Omit
<ISubscription
<T
>, keyof Paths
> & Paths
Inherited from
Document.$assertPopulated
Source
twitchfy/node_modules/mongoose/types/document.d.ts:29
$clone()
1$clone(): this
Returns a deep clone of this document
Returns
this
Inherited from
Document.$clone
Source
twitchfy/node_modules/mongoose/types/document.d.ts:32
$getAllSubdocs()
1$getAllSubdocs(): Document<any, any, any>[]
Returns
Document
<any
, any
, any
>[]
Inherited from
Document.$getAllSubdocs
Source
twitchfy/node_modules/mongoose/types/document.d.ts:35
$getPopulatedDocs()
1$getPopulatedDocs(): Document<any, any, any>[]
Returns an array of all populated documents associated with the query
Returns
Document
<any
, any
, any
>[]
Inherited from
Document.$getPopulatedDocs
Source
twitchfy/node_modules/mongoose/types/document.d.ts:47
$ignore()
1$ignore(path: string): void
Don’t run validation on this path or persist changes to this path.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
void
Inherited from
Document.$ignore
Source
twitchfy/node_modules/mongoose/types/document.d.ts:38
$inc()
1$inc(path: string | string[], val?: number): this
Increments the numeric value at path
by the given val
.
When you call save()
on this document, Mongoose will send a
$inc
as opposed to a $set
.
Parameters
Parameter | Type |
---|---|
path | string | string [] |
val ? | number |
Returns
this
Inherited from
Document.$inc
Source
twitchfy/node_modules/mongoose/types/document.d.ts:54
$isDefault()
1$isDefault(path: string): boolean
Checks if a path is set to its default.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.$isDefault
Source
twitchfy/node_modules/mongoose/types/document.d.ts:41
$isDeleted()
1$isDeleted(val?: boolean): boolean
Getter/setter, determines whether the document was removed or not.
Parameters
Parameter | Type |
---|---|
val ? | boolean |
Returns
boolean
Inherited from
Document.$isDeleted
Source
twitchfy/node_modules/mongoose/types/document.d.ts:44
$isEmpty()
1$isEmpty(path: string): boolean
Returns true if the given path is nullish or only contains empty objects. Useful for determining whether this subdoc will get stripped out by the minimize option.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.$isEmpty
Source
twitchfy/node_modules/mongoose/types/document.d.ts:61
$isValid()
1$isValid(path: string): boolean
Checks if a path is invalid
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.$isValid
Source
twitchfy/node_modules/mongoose/types/document.d.ts:64
$markValid()
1$markValid(path: string): void
Marks a path as valid, removing existing validation errors.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
void
Inherited from
Document.$markValid
Source
twitchfy/node_modules/mongoose/types/document.d.ts:74
$model()
$model(name)
1$model<ModelType>(name: string): ModelType
Returns the model with the given name on this document’s associated connection.
Type parameters
Type parameter | Value |
---|---|
ModelType | Model <unknown , object , object , object , Document <unknown , object , unknown > & Required <object >, any > |
Parameters
Parameter | Type |
---|---|
name | string |
Returns
ModelType
Inherited from
Document.$model
Source
twitchfy/node_modules/mongoose/types/document.d.ts:77
$model()
1$model<ModelType>(): ModelType
Type parameters
Type parameter | Value |
---|---|
ModelType | Model <any , object , object , object , any , any > |
Returns
ModelType
Inherited from
Document.$model
Source
twitchfy/node_modules/mongoose/types/document.d.ts:78
$parent()
1$parent(): Document<any, any, any>
If this document is a subdocument or populated document, returns the document’s parent. Returns undefined otherwise.
Returns
Document
<any
, any
, any
>
Inherited from
Document.$parent
Source
twitchfy/node_modules/mongoose/types/document.d.ts:219
$session()
1$session(session?: ClientSession): ClientSession
Getter/setter around the session associated with this document. Used to
automatically set session
if you save()
a doc that you got from a
query with an associated session.
Parameters
Parameter | Type |
---|---|
session ? | ClientSession |
Returns
ClientSession
Inherited from
Document.$session
Source
twitchfy/node_modules/mongoose/types/document.d.ts:91
$set()
$set(path, val, type, options)
1$set(2 path: string | Record<string, any>,3 val: any,4 type: any,5 options?: DocumentSetOptions): this
Alias for set()
, used internally to avoid conflicts
Parameters
Parameter | Type |
---|---|
path | string | Record <string , any > |
val | any |
type | any |
options ? | DocumentSetOptions |
Returns
this
Inherited from
Document.$set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:94
$set(path, val, options)
1$set(2 path: string | Record<string, any>,3 val: any,4 options?: DocumentSetOptions): this
Parameters
Parameter | Type |
---|---|
path | string | Record <string , any > |
val | any |
options ? | DocumentSetOptions |
Returns
this
Inherited from
Document.$set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:95
$set(value)
1$set(value: string | Record<string, any>): this
Parameters
Parameter | Type |
---|---|
value | string | Record <string , any > |
Returns
this
Inherited from
Document.$set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:96
deleteOne()
1deleteOne(options?: QueryOptions<unknown>): any
Removes this document from the db.
Parameters
Parameter | Type |
---|---|
options ? | QueryOptions <unknown > |
Returns
any
Inherited from
Document.deleteOne
Source
twitchfy/node_modules/mongoose/types/document.d.ts:111
depopulate()
1depopulate(path?: string | string[]): this
Takes a populated field and returns it to its unpopulated state. If called with no arguments, then all populated fields are returned to their unpopulated state.
Parameters
Parameter | Type |
---|---|
path ? | string | string [] |
Returns
this
Inherited from
Document.depopulate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:123
directModifiedPaths()
1directModifiedPaths(): string[]
Returns the list of paths that have been directly modified. A direct
modified path is a path that you explicitly set, whether via doc.foo = 'bar'
,
Object.assign(doc, { foo: 'bar' })
, or doc.set('foo', 'bar')
.
Returns
string
[]
Inherited from
Document.directModifiedPaths
Source
twitchfy/node_modules/mongoose/types/document.d.ts:130
equals()
1equals(doc: Document<any, any, any>): boolean
Returns true if this document is equal to another document.
Documents are considered equal when they have matching _id
s, unless neither
document has an _id
, in which case this function falls back to using
deepEqual()
.
Parameters
Parameter | Type |
---|---|
doc | Document <any , any , any > |
Returns
boolean
Inherited from
Document.equals
Source
twitchfy/node_modules/mongoose/types/document.d.ts:139
get()
get(path, type, options)
1get<T>(2 path: T,3 type?: any,4 options?: any): any
Returns the value of a path.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
type ? | any |
options ? | any |
Returns
any
Inherited from
Document.get
Source
twitchfy/node_modules/mongoose/types/document.d.ts:145
get(path, type, options)
1get(2 path: string,3 type?: any,4 options?: any): any
Parameters
Parameter | Type |
---|---|
path | string |
type ? | any |
options ? | any |
Returns
any
Inherited from
Document.get
Source
twitchfy/node_modules/mongoose/types/document.d.ts:146
getChanges()
1getChanges(): UpdateQuery<ISubscription<T>>
Returns the changes that happened to the document in the format that will be sent to MongoDB.
Returns
UpdateQuery
<ISubscription
<T
>>
Inherited from
Document.getChanges
Source
twitchfy/node_modules/mongoose/types/document.d.ts:152
increment()
1increment(): this
Signal that we desire an increment of this documents version.
Returns
this
Inherited from
Document.increment
Source
twitchfy/node_modules/mongoose/types/document.d.ts:158
init()
1init(obj: AnyObject, opts?: AnyObject): this
Initializes the document without setters or marking anything modified. Called internally after a document is returned from mongodb. Normally, you do not need to call this function on your own.
Parameters
Parameter | Type |
---|---|
obj | AnyObject |
opts ? | AnyObject |
Returns
this
Inherited from
Document.init
Source
twitchfy/node_modules/mongoose/types/document.d.ts:165
invalidate()
invalidate(path, errorMsg, value, kind)
1invalidate<T>(2 path: T,3 errorMsg: string | NativeError,4 value?: any,5 kind?: string): NativeError
Marks a path as invalid, causing validation to fail.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
errorMsg | string | NativeError |
value ? | any |
kind ? | string |
Returns
NativeError
Inherited from
Document.invalidate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:168
invalidate(path, errorMsg, value, kind)
1invalidate(2 path: string,3 errorMsg: string | NativeError,4 value?: any,5 kind?: string): NativeError
Parameters
Parameter | Type |
---|---|
path | string |
errorMsg | string | NativeError |
value ? | any |
kind ? | string |
Returns
NativeError
Inherited from
Document.invalidate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:169
isDirectModified()
isDirectModified(path)
1isDirectModified<T>(path: T | T[]): boolean
Returns true if path
was directly set and modified, else false.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T | T [] |
Returns
boolean
Inherited from
Document.isDirectModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:172
isDirectModified(path)
1isDirectModified(path: string | string[]): boolean
Parameters
Parameter | Type |
---|---|
path | string | string [] |
Returns
boolean
Inherited from
Document.isDirectModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:173
isDirectSelected()
isDirectSelected(path)
1isDirectSelected<T>(path: T): boolean
Checks if path
was explicitly selected. If no projection, always returns true.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
Returns
boolean
Inherited from
Document.isDirectSelected
Source
twitchfy/node_modules/mongoose/types/document.d.ts:176
isDirectSelected(path)
1isDirectSelected(path: string): boolean
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.isDirectSelected
Source
twitchfy/node_modules/mongoose/types/document.d.ts:177
isInit()
isInit(path)
1isInit<T>(path: T): boolean
Checks if path
is in the init
state, that is, it was set by Document#init()
and not modified since.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
Returns
boolean
Inherited from
Document.isInit
Source
twitchfy/node_modules/mongoose/types/document.d.ts:180
isInit(path)
1isInit(path: string): boolean
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.isInit
Source
twitchfy/node_modules/mongoose/types/document.d.ts:181
isModified()
isModified(path, options)
1isModified<T>(path?: T | T[], options?: object): boolean
Returns true if any of the given paths are modified, else false. If no arguments, returns true
if any path
in this document is modified.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path ? | T | T [] |
options ? | object |
options.ignoreAtomics ? | boolean |
Returns
boolean
Inherited from
Document.isModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:187
isModified(path, options)
1isModified(path?: string | string[], options?: object): boolean
Parameters
Parameter | Type |
---|---|
path ? | string | string [] |
options ? | object |
options.ignoreAtomics ? | boolean |
Returns
boolean
Inherited from
Document.isModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:188
isSelected()
isSelected(path)
1isSelected<T>(path: T): boolean
Checks if path
was selected in the source query which initialized this document.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
Returns
boolean
Inherited from
Document.isSelected
Source
twitchfy/node_modules/mongoose/types/document.d.ts:194
isSelected(path)
1isSelected(path: string): boolean
Parameters
Parameter | Type |
---|---|
path | string |
Returns
boolean
Inherited from
Document.isSelected
Source
twitchfy/node_modules/mongoose/types/document.d.ts:195
markModified()
markModified(path, scope)
1markModified<T>(path: T, scope?: any): void
Marks the path as having pending changes to write to the db.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
scope ? | any |
Returns
void
Inherited from
Document.markModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:198
markModified(path, scope)
1markModified(path: string, scope?: any): void
Parameters
Parameter | Type |
---|---|
path | string |
scope ? | any |
Returns
void
Inherited from
Document.markModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:199
model()
model(name)
1model<ModelType>(name: string): ModelType
Returns the model with the given name on this document’s associated connection.
Type parameters
Type parameter | Value |
---|---|
ModelType | Model <unknown , object , object , object , Document <unknown , object , unknown > & Required <object >, any > |
Parameters
Parameter | Type |
---|---|
name | string |
Returns
ModelType
Inherited from
Document.model
Source
twitchfy/node_modules/mongoose/types/document.d.ts:202
model()
1model<ModelType>(): ModelType
Type parameters
Type parameter | Value |
---|---|
ModelType | Model <any , object , object , object , any , any > |
Returns
ModelType
Inherited from
Document.model
Source
twitchfy/node_modules/mongoose/types/document.d.ts:203
modifiedPaths()
1modifiedPaths(options?: object): string[]
Returns the list of paths that have been modified.
Parameters
Parameter | Type |
---|---|
options ? | object |
options.includeChildren ? | boolean |
Returns
string
[]
Inherited from
Document.modifiedPaths
Source
twitchfy/node_modules/mongoose/types/document.d.ts:206
overwrite()
1overwrite(obj: AnyObject): this
Overwrite all values in this document with the values of obj
, except
for immutable properties. Behaves similarly to set()
, except for it
unsets all properties that aren’t in obj
.
Parameters
Parameter | Type |
---|---|
obj | AnyObject |
Returns
this
Inherited from
Document.overwrite
Source
twitchfy/node_modules/mongoose/types/document.d.ts:213
populate()
populate(path)
1populate<Paths>(path: string | PopulateOptions | (string | PopulateOptions)[]): Promise<MergeType<ISubscription<T>, Paths>>
Populates document references.
Type parameters
Type parameter | Value |
---|---|
Paths | object |
Parameters
Parameter | Type |
---|---|
path | string | PopulateOptions | (string | PopulateOptions )[] |
Returns
Promise
<MergeType
<ISubscription
<T
>, Paths
>>
Inherited from
Document.populate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:222
populate(path, select, model, match, options)
1populate<Paths>(2 path: string,3 select?: string | AnyObject,4 model?: Model<any, object, object, object, any, any>,5 match?: AnyObject,6options?: PopulateOptions): Promise<MergeType<ISubscription<T>, Paths>>
Type parameters
Type parameter | Value |
---|---|
Paths | object |
Parameters
Parameter | Type |
---|---|
path | string |
select ? | string | AnyObject |
model ? | Model <any , object , object , object , any , any > |
match ? | AnyObject |
options ? | PopulateOptions |
Returns
Promise
<MergeType
<ISubscription
<T
>, Paths
>>
Inherited from
Document.populate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:223
populated()
1populated(path: string): any
Gets _id(s) used during population of the given path
. If the path was not populated, returns undefined
.
Parameters
Parameter | Type |
---|---|
path | string |
Returns
any
Inherited from
Document.populated
Source
twitchfy/node_modules/mongoose/types/document.d.ts:226
replaceOne()
1replaceOne(replacement?: AnyObject, options?: QueryOptions<unknown>): Query<any, ISubscription<T>, object, ISubscription<T>, "find">
Sends a replaceOne command with this document _id
as the query selector.
Parameters
Parameter | Type |
---|---|
replacement ? | AnyObject |
options ? | QueryOptions <unknown > |
Returns
Query
<any
, ISubscription
<T
>, object
, ISubscription
<T
>, "find"
>
Inherited from
Document.replaceOne
Source
twitchfy/node_modules/mongoose/types/document.d.ts:229
save()
1save(options?: SaveOptions): Promise<ISubscription<T>>
Saves this document by inserting a new document into the database if document.isNew is true
, or sends an updateOne operation with just the modified paths if isNew
is false
.
Parameters
Parameter | Type |
---|---|
options ? | SaveOptions |
Returns
Promise
<ISubscription
<T
>>
Inherited from
Document.save
Source
twitchfy/node_modules/mongoose/types/document.d.ts:232
set()
set(path, val, type, options)
1set<T>(2 path: T,3 val: any,4 type: any,5 options?: DocumentSetOptions): this
Sets the value of a path, or many paths.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
val | any |
type | any |
options ? | DocumentSetOptions |
Returns
this
Inherited from
Document.set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:238
set(path, val, type, options)
1set(2 path: string | Record<string, any>,3 val: any,4 type: any,5 options?: DocumentSetOptions): this
Parameters
Parameter | Type |
---|---|
path | string | Record <string , any > |
val | any |
type | any |
options ? | DocumentSetOptions |
Returns
this
Inherited from
Document.set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:239
set(path, val, options)
1set(2 path: string | Record<string, any>,3 val: any,4 options?: DocumentSetOptions): this
Parameters
Parameter | Type |
---|---|
path | string | Record <string , any > |
val | any |
options ? | DocumentSetOptions |
Returns
this
Inherited from
Document.set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:240
set(value)
1set(value: string | Record<string, any>): this
Parameters
Parameter | Type |
---|---|
value | string | Record <string , any > |
Returns
this
Inherited from
Document.set
Source
twitchfy/node_modules/mongoose/types/document.d.ts:241
toJSON()
toJSON(options)
1toJSON<T>(options?: ToObjectOptions<Document<unknown, object, unknown> & Required<object>> & object): FlattenMaps<T>
The return value of this method is used in calls to JSON.stringify(doc).
Type parameters
Type parameter | Value |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
options ? | ToObjectOptions <Document <unknown , object , unknown > & Required <object >> & object |
Returns
FlattenMaps
<T
>
Inherited from
Document.toJSON
Source
twitchfy/node_modules/mongoose/types/document.d.ts:244
toJSON(options)
1toJSON<T>(options: ToObjectOptions<Document<unknown, object, unknown> & Required<object>> & object): T
Type parameters
Type parameter | Value |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
options | ToObjectOptions <Document <unknown , object , unknown > & Required <object >> & object |
Returns
T
Inherited from
Document.toJSON
Source
twitchfy/node_modules/mongoose/types/document.d.ts:245
toObject()
1toObject<T>(options?: ToObjectOptions<Document<unknown, object, unknown> & Required<object>>): Require_id<T>
Converts this document into a plain-old JavaScript object (POJO).
Type parameters
Type parameter | Value |
---|---|
T | any |
Parameters
Parameter | Type |
---|---|
options ? | ToObjectOptions <Document <unknown , object , unknown > & Required <object >> |
Returns
Require_id
<T
>
Inherited from
Document.toObject
Source
twitchfy/node_modules/mongoose/types/document.d.ts:248
unmarkModified()
unmarkModified(path)
1unmarkModified<T>(path: T): void
Clears the modified state on the specified path.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
path | T |
Returns
void
Inherited from
Document.unmarkModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:251
unmarkModified(path)
1unmarkModified(path: string): void
Parameters
Parameter | Type |
---|---|
path | string |
Returns
void
Inherited from
Document.unmarkModified
Source
twitchfy/node_modules/mongoose/types/document.d.ts:252
updateOne()
1updateOne(update?: UpdateWithAggregationPipeline | UpdateQuery<ISubscription<T>>, options?: QueryOptions<unknown>): Query<any, ISubscription<T>, object, ISubscription<T>, "find">
Sends an updateOne command with this document _id
as the query selector.
Parameters
Parameter | Type |
---|---|
update ? | UpdateWithAggregationPipeline | UpdateQuery <ISubscription <T >> |
options ? | QueryOptions <unknown > |
Returns
Query
<any
, ISubscription
<T
>, object
, ISubscription
<T
>, "find"
>
Inherited from
Document.updateOne
Source
twitchfy/node_modules/mongoose/types/document.d.ts:255
validate()
validate(pathsToValidate, options)
1validate<T>(pathsToValidate?: T | T[], options?: AnyObject): Promise<void>
Executes registered validation rules for this document.
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
pathsToValidate ? | T | T [] |
options ? | AnyObject |
Returns
Promise
<void
>
Inherited from
Document.validate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:258
validate(pathsToValidate, options)
1validate(pathsToValidate?: PathsToValidate, options?: AnyObject): Promise<void>
Parameters
Parameter | Type |
---|---|
pathsToValidate ? | PathsToValidate |
options ? | AnyObject |
Returns
Promise
<void
>
Inherited from
Document.validate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:259
validate(options)
1validate(options: object): Promise<void>
Parameters
Parameter | Type |
---|---|
options | object |
options.pathsToSkip ? | pathsToSkip |
Returns
Promise
<void
>
Inherited from
Document.validate
Source
twitchfy/node_modules/mongoose/types/document.d.ts:260
validateSync()
validateSync(options)
1validateSync(options: object): ValidationError
Executes registered validation rules (skipping asynchronous validators) for this document.
Parameters
Parameter | Type |
---|---|
options | object |
options.pathsToSkip ? | pathsToSkip |
Returns
ValidationError
Inherited from
Document.validateSync
Source
twitchfy/node_modules/mongoose/types/document.d.ts:263
validateSync(pathsToValidate, options)
1validateSync<T>(pathsToValidate?: T | T[], options?: AnyObject): ValidationError
Type parameters
Type parameter |
---|
T extends string | number | symbol |
Parameters
Parameter | Type |
---|---|
pathsToValidate ? | T | T [] |
options ? | AnyObject |
Returns
ValidationError
Inherited from
Document.validateSync
Source
twitchfy/node_modules/mongoose/types/document.d.ts:264
validateSync(pathsToValidate, options)
1validateSync(pathsToValidate?: PathsToValidate, options?: AnyObject): ValidationError
Parameters
Parameter | Type |
---|---|
pathsToValidate ? | PathsToValidate |
options ? | AnyObject |
Returns
ValidationError
Inherited from
Document.validateSync
Source
twitchfy/node_modules/mongoose/types/document.d.ts:265