Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
mongoose
Document
Interface Document
Index
Properties
_id
errors
id
isNew
schema
Methods
equals
get
inspect
invalidate
isDirectModified
isInit
isModified
isSelected
markModified
modifiedPaths
populate
populated
remove
save
set
toJSON
toObject
toString
update
validate
Properties
public
_id
:
string
public
errors
:
Object
optional
public
id
?:
string
public
isNew
:
boolean
public
schema
:
Object
Methods
public
equals
(
doc
:
Document
)
:
boolean
Parameters
doc:
Document
Returns
boolean
public
get
(
path
:
string
, type
?:
new(...args: any[]) => any
)
:
any
Parameters
path:
string
type?:
new(...args: any[]) => any
optional
Returns
any
public
inspect
(
options
?:
Object
)
:
string
Parameters
options?:
Object
optional
Returns
string
public
invalidate
(
path
:
string
, errorMsg
:
string
, value
:
any
)
Parameters
path:
string
errorMsg:
string
value:
any
public
invalidate
(
path
:
string
, error
:
Error
, value
:
any
)
Parameters
path:
string
error:
Error
value:
any
public
isDirectModified
(
path
:
string
)
:
boolean
Parameters
path:
string
Returns
boolean
public
isInit
(
path
:
string
)
:
boolean
Parameters
path:
string
Returns
boolean
public
isModified
(
path
?:
string
)
:
boolean
Parameters
path?:
string
optional
Returns
boolean
public
isSelected
(
path
:
string
)
:
boolean
Parameters
path:
string
Returns
boolean
public
markModified
(
path
:
string
)
Parameters
path:
string
public
modifiedPaths
(
)
:
Array<string>
Returns
Array<string>
public
populate
(
callback
?:
(err: any, res: T) => void
)
:
Document
Parameters
callback?:
(err: any, res: T) => void
optional
Returns
Document
public
populate
(
path
?:
string
, callback
?:
(err: any, res: T) => void
)
:
Document
Parameters
path?:
string
optional
callback?:
(err: any, res: T) => void
optional
Returns
Document
public
populate
(
opt
:
PopulateOption
, callback
?:
(err: any, res: T) => void
)
:
Document
Parameters
opt:
PopulateOption
callback?:
(err: any, res: T) => void
optional
Returns
Document
public
populated
(
path
:
string
)
:
any
Parameters
path:
string
Returns
any
public
remove
(
callback
?:
(err: any) => void
)
:
Query
Parameters
callback?:
(err: any) => void
optional
Returns
Query
public
save
(
callback
?:
(err: any, res: T) => void
)
Parameters
callback?:
(err: any, res: T) => void
optional
public
set
(
path
:
string
, val
:
any
, type
?:
new(...args: any[]) => any
, options
?:
Object
)
Parameters
path:
string
val:
any
type?:
new(...args: any[]) => any
optional
options?:
Object
optional
public
set
(
path
:
string
, val
:
any
, options
?:
Object
)
Parameters
path:
string
val:
any
options?:
Object
optional
public
set
(
value
:
Object
)
Parameters
value:
Object
public
toJSON
(
options
?:
Object
)
:
Object
Parameters
options?:
Object
optional
Returns
Object
public
toObject
(
options
?:
Object
)
:
Object
Parameters
options?:
Object
optional
Returns
Object
public
toString
(
)
:
string
Returns
string
public
update
(
doc
:
Object
, options
:
Object
, callback
:
(err: any, affectedRows: number, raw: any) => void
)
:
Query
Parameters
doc:
Object
options:
Object
callback:
(err: any, affectedRows: number, raw: any) => void
Returns
Query
public
validate
(
cb
:
(err: any) => void
)
Parameters
cb:
(err: any) => void
Globals
NodeJS
assert
buffer
child_process
cluster
crypto
dgram
dns
domain
events
fs
http
https
mongoose
mongoose.Types
net
os
path
punycode
querystring
readline
repl
stream
string_decoder
tls
tty
url
util
vm
zlib
connection
mongo
mquery
version
Collection
Connection
ConnectionOption
ConnectionSetOption
Document
_id
errors
id
isNew
schema
equals
get
inspect
invalidate
isDirectModified
isInit
isModified
isSelected
markModified
modifiedPaths
populate
populated
remove
save
set
toJSON
toObject
toString
update
validate
FindAndUpdateOption
GeoSearchOption
MapReduceOption
MapReduceOption2
MapReduceResult
Model
PopulateOption
QueryStream
SchemaOption
Aggregate
Mongoose
Promise
Query
Schema
SchemaType
VirtualType
connect
createConnection
disconnect
get
model
modelNames
plugin
set