@vttforge/types / TokenDocumentLike
Interface: TokenDocumentLike<System> ​
A token's position and size on a scene.
Extends ​
DocumentMembers<System>
Type Parameters ​
System ​
System = Record<string, unknown>
Properties ​
actor ​
readonlyactor:ActorLike<Record<string,unknown>,ItemLike<Record<string,unknown>>> |null
actorId ​
readonlyactorId:string|null
actorLink ​
readonlyactorLink:boolean
alpha ​
readonlyalpha:number
bar1 ​
readonlybar1:object
attribute ​
attribute:
string|null
bar2 ​
readonlybar2:object
attribute ​
attribute:
string|null
combatant ​
readonlycombatant:CombatantLike<Record<string,unknown>> |null
depth ​
readonlydepth:number
New in v14, alongside level.
displayBars ​
readonlydisplayBars:number
displayName ​
readonlydisplayName:number
disposition ​
readonlydisposition:number
documentName ​
readonlydocumentName:string
'Actor', 'Item', 'ActiveEffect', and so on.
Inherited from ​
elevation ​
readonlyelevation:number
flags ​
readonlyflags:DocumentFlags
Inherited from ​
height ​
readonlyheight:number
hidden ​
readonlyhidden:boolean
id ​
readonlyid:string|null
Inherited from ​
img ​
readonlyimg:string|null
Inherited from ​
inCombat ​
readonlyinCombat:boolean
isOwner ​
readonlyisOwner:boolean
Whether the current user owns this document.
Inherited from ​
level ​
readonlylevel:string
The Level document this token stands on. New in v14.
light ​
readonlylight:Record<string,unknown>
locked ​
readonlylocked:boolean
lockRotation ​
readonlylockRotation:boolean
movementAction ​
readonlymovementAction:string
name ​
readonlyname:string
Inherited from ​
object ​
readonlyobject:TokenObjectLike|null
parent ​
readonlyparent:DocumentMembers<Record<string,unknown>> |null
The document this one is embedded in, or null at the top level.
Inherited from ​
rotation ​
readonlyrotation:number
shape ​
readonlyshape:number
sight ​
readonlysight:object
Index Signature ​
[key: string]: unknown
enabled ​
enabled:
boolean
range ​
range:
number
sort ​
readonlysort:number
system ​
readonlysystem:System
The type data model instance. Its fields are the schema's fields.
Inherited from ​
texture ​
readonlytexture:object
Index Signature ​
[key: string]: unknown
src ​
src:
string|null
type ​
readonlytype:string
The subtype, as declared under documentTypes in the manifest.
Inherited from ​
uuid ​
readonlyuuid:string
Inherited from ​
width ​
readonlywidth:number
x ​
readonlyx:number
y ​
readonlyy:number
Methods ​
delete() ​
delete(
operation?):Promise<TokenDocumentLike<System> |undefined>
Parameters ​
operation? ​
Record<string, unknown>
Returns ​
Promise<TokenDocumentLike<System> | undefined>
Inherited from ​
getCenterPoint() ​
getCenterPoint(
data?):object
Parameters ​
data? ​
Record<string, unknown>
Returns ​
object
elevation ​
elevation:
number
x ​
x:
number
y ​
y:
number
getFlag() ​
getFlag<
T>(scope,key):T|undefined
Type Parameters ​
T ​
T = unknown
Parameters ​
scope ​
string
key ​
string
Returns ​
T | undefined
Inherited from ​
getSize() ​
getSize(
data?):object
Parameters ​
data? ​
Record<string, unknown>
Returns ​
object
height ​
height:
number
width ​
width:
number
getUserLevel() ​
getUserLevel(
user):number|null
Parameters ​
user ​
Returns ​
number | null
setFlag() ​
setFlag(
scope,key,value):Promise<TokenDocumentLike<System>>
Parameters ​
scope ​
string
key ​
string
value ​
unknown
Returns ​
Promise<TokenDocumentLike<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<TokenDocumentLike<System>>
Parameters ​
scope ​
string
key ​
string
Returns ​
Promise<TokenDocumentLike<System>>
Inherited from ​
update() ​
update(
data,operation?):Promise<TokenDocumentLike<System> |undefined>
Parameters ​
data ​
Record<string, unknown>
operation? ​
Record<string, unknown>
Returns ​
Promise<TokenDocumentLike<System> | undefined>