@vttforge/core / ItemLike
Interface: ItemLike<System>
An Item, as a drop hands one over.
Extends
DocumentMembers<System>.EmbeddedDocumentOwner
Type Parameters
System
System = Record<string, unknown>
Properties
actor
readonlyactor:ActorLike<Record<string,unknown>,ItemLike<Record<string,unknown>>> |null
The Actor this Item belongs to, or null for a world Item.
documentName
readonlydocumentName:string
'Actor', 'Item', 'ActiveEffect', and so on.
Inherited from
effects
readonlyeffects:EmbeddedCollection<ActiveEffectLike<Record<string,unknown>>>
flags
readonlyflags:DocumentFlags
Inherited from
id
readonlyid:string|null
Inherited from
img
readonlyimg:string|null
Inherited from
isOwner
readonlyisOwner:boolean
Whether the current user owns this document.
Inherited from
name
readonlyname:string
Inherited from
parent
readonlyparent:DocumentMembers<Record<string,unknown>> |null
The document this one is embedded in, or null at the top level.
Inherited from
system
readonlysystem:System
The type data model instance. Its fields are the schema's fields.
Inherited from
type
readonlytype:string
The subtype, as declared under documentTypes in the manifest.
Inherited from
uuid
readonlyuuid:string
Inherited from
Methods
createEmbeddedDocuments()
createEmbeddedDocuments(
name,data,operation?):Promise<unknown[]>
Parameters
name
string
data
readonly Record<string, unknown>[]
operation?
Record<string, unknown>
Returns
Promise<unknown[]>
Inherited from
EmbeddedDocumentOwner.createEmbeddedDocuments
delete()
delete(
operation?):Promise<ItemLike<System> |undefined>
Parameters
operation?
Record<string, unknown>
Returns
Promise<ItemLike<System> | undefined>
Inherited from
deleteEmbeddedDocuments()
deleteEmbeddedDocuments(
name,ids,operation?):Promise<unknown[]>
Parameters
name
string
ids
readonly string[]
operation?
Record<string, unknown>
Returns
Promise<unknown[]>
Inherited from
EmbeddedDocumentOwner.deleteEmbeddedDocuments
getEmbeddedDocument()
getEmbeddedDocument(
name,id):unknown
Parameters
name
string
id
string
Returns
unknown
Inherited from
EmbeddedDocumentOwner.getEmbeddedDocument
getFlag()
getFlag<
T>(scope,key):T|undefined
Type Parameters
T
T = unknown
Parameters
scope
string
key
string
Returns
T | undefined
Inherited from
getRollData()
getRollData():
Record<string,unknown>
Roll data for @-references in a formula.
Returns
Record<string, unknown>
setFlag()
setFlag(
scope,key,value):Promise<ItemLike<System>>
Parameters
scope
string
key
string
value
unknown
Returns
Promise<ItemLike<System>>
Inherited from
toObject()
toObject(
source?):Record<string,unknown>
A plain-object copy. source reads the stored data instead of the prepared data.
Parameters
source?
boolean
Returns
Record<string, unknown>
Inherited from
unsetFlag()
unsetFlag(
scope,key):Promise<ItemLike<System>>
Parameters
scope
string
key
string
Returns
Promise<ItemLike<System>>
Inherited from
update()
update(
data,operation?):Promise<ItemLike<System> |undefined>
Parameters
data
Record<string, unknown>
operation?
Record<string, unknown>
Returns
Promise<ItemLike<System> | undefined>
Inherited from
updateEmbeddedDocuments()
updateEmbeddedDocuments(
name,updates,operation?):Promise<unknown[]>
Parameters
name
string
updates
readonly Record<string, unknown>[]
operation?
Record<string, unknown>
Returns
Promise<unknown[]>