@vttforge/types / WorldCollection
Interface: WorldCollection<V> ​
A world-level collection, as game.actors and game.items are. It adds document creation and compendium import on top of a plain collection.
Extends ​
Type Parameters ​
V ​
V
Properties ​
contents ​
readonlycontents:V[]
The values as an array.
Inherited from ​
directory ​
readonlydirectory:unknown
documentName ​
readonlydocumentName:string
name ​
readonlyname:string
size ​
readonlysize:number
Inherited from ​
Methods ​
[iterator]() ​
[iterator]():
Iterator<V,any,any>
Returns ​
Iterator<V, any, any>
Inherited from ​
entries() ​
entries():
IterableIterator<[string,V]>
Returns ​
IterableIterator<[string, V]>
Inherited from ​
every() ​
every(
condition):boolean
Parameters ​
condition ​
(entry) => boolean
Returns ​
boolean
Inherited from ​
filter() ​
filter(
condition):V[]
Parameters ​
condition ​
(entry) => boolean
Returns ​
V[]
Inherited from ​
find() ​
find(
condition):V|undefined
Parameters ​
condition ​
(entry) => boolean
Returns ​
V | undefined
Inherited from ​
forEach() ​
forEach(
fn):void
Parameters ​
fn ​
(entry) => void
Returns ​
void
Inherited from ​
get() ​
get(
key,options?):V|undefined
Parameters ​
key ​
string
options? ​
strict? ​
boolean
Returns ​
V | undefined
Inherited from ​
getName() ​
getName(
name,options?):V|undefined
Look one up by name rather than by id.
Parameters ​
name ​
string
options? ​
strict? ​
boolean
Returns ​
V | undefined
Inherited from ​
importFromCompendium() ​
importFromCompendium(
pack,id,updateData?,options?):Promise<V>
Parameters ​
pack ​
id ​
string
updateData? ​
Record<string, unknown>
options? ​
Record<string, unknown>
Returns ​
Promise<V>
keys() ​
keys():
IterableIterator<string>
Returns ​
IterableIterator<string>
Inherited from ​
map() ​
map<
U>(transformer):U[]
Type Parameters ​
U ​
U
Parameters ​
transformer ​
(entry) => U
Returns ​
U[]
Inherited from ​
reduce() ​
reduce<
U>(reducer,initial):U
Type Parameters ​
U ​
U
Parameters ​
reducer ​
(carry, entry) => U
initial ​
U
Returns ​
U
Inherited from ​
some() ​
some(
condition):boolean
Parameters ​
condition ​
(entry) => boolean
Returns ​
boolean
Inherited from ​
toJSON() ​
toJSON():
Record<string,unknown>[]
Returns ​
Record<string, unknown>[]
Inherited from ​
values() ​
values():
IterableIterator<V>
Returns ​
IterableIterator<V>