Skip to content

@vttforge/core / CompendiumCollection

Interface: CompendiumCollection ​

One compendium pack.

Extends ​

Properties ​

collection ​

readonly collection: string


contents ​

readonly contents: unknown[]

The values as an array.

Inherited from ​

FoundryCollection.contents


index ​

readonly index: FoundryCollection<{ _id: string; img?: string; name: string; type?: string; }>


locked ​

readonly locked: boolean


metadata ​

readonly metadata: object

id ​

readonly id: string

label ​

readonly label: string

packageName ​

readonly packageName: string

packageType ​

readonly packageType: string

system? ​

readonly optional system?: string

type ​

readonly type: string


size ​

readonly size: number

Inherited from ​

FoundryCollection.size

Methods ​

[iterator]() ​

[iterator](): Iterator<unknown, any, any>

Returns ​

Iterator<unknown, any, any>

Inherited from ​

FoundryCollection.[iterator]


configure() ​

configure(options): Promise<unknown>

Parameters ​

options ​

Record<string, unknown>

Returns ​

Promise<unknown>


entries() ​

entries(): IterableIterator<[string, unknown]>

Returns ​

IterableIterator<[string, unknown]>

Inherited from ​

FoundryCollection.entries


every() ​

every(condition): boolean

Parameters ​

condition ​

(entry) => boolean

Returns ​

boolean

Inherited from ​

FoundryCollection.every


filter() ​

filter(condition): unknown[]

Parameters ​

condition ​

(entry) => boolean

Returns ​

unknown[]

Inherited from ​

FoundryCollection.filter


find() ​

find(condition): unknown

Parameters ​

condition ​

(entry) => boolean

Returns ​

unknown

Inherited from ​

FoundryCollection.find


forEach() ​

forEach(fn): void

Parameters ​

fn ​

(entry) => void

Returns ​

void

Inherited from ​

FoundryCollection.forEach


get() ​

get(key, options?): unknown

Parameters ​

key ​

string

options? ​
strict? ​

boolean

Returns ​

unknown

Inherited from ​

FoundryCollection.get


getDocument() ​

getDocument<T>(id): Promise<T | null>

Type Parameters ​

T ​

T = unknown

Parameters ​

id ​

string

Returns ​

Promise<T | null>


getDocuments() ​

getDocuments<T>(query?): Promise<T[]>

Type Parameters ​

T ​

T = unknown

Parameters ​

query? ​

Record<string, unknown>

Returns ​

Promise<T[]>


getIndex() ​

getIndex(options?): Promise<FoundryCollection<unknown>>

Parameters ​

options? ​
fields? ​

readonly string[]

Returns ​

Promise<FoundryCollection<unknown>>


getName() ​

getName(name, options?): unknown

Look one up by name rather than by id.

Parameters ​

name ​

string

options? ​
strict? ​

boolean

Returns ​

unknown

Inherited from ​

FoundryCollection.getName


importDocument() ​

importDocument<T>(document, options?): Promise<T>

Type Parameters ​

T ​

T = unknown

Parameters ​

document ​

T

options? ​

Record<string, unknown>

Returns ​

Promise<T>


keys() ​

keys(): IterableIterator<string>

Returns ​

IterableIterator<string>

Inherited from ​

FoundryCollection.keys


map() ​

map<U>(transformer): U[]

Type Parameters ​

U ​

U

Parameters ​

transformer ​

(entry) => U

Returns ​

U[]

Inherited from ​

FoundryCollection.map


reduce() ​

reduce<U>(reducer, initial): U

Type Parameters ​

U ​

U

Parameters ​

reducer ​

(carry, entry) => U

initial ​

U

Returns ​

U

Inherited from ​

FoundryCollection.reduce


some() ​

some(condition): boolean

Parameters ​

condition ​

(entry) => boolean

Returns ​

boolean

Inherited from ​

FoundryCollection.some


toJSON() ​

toJSON(): Record<string, unknown>[]

Returns ​

Record<string, unknown>[]

Inherited from ​

FoundryCollection.toJSON


values() ​

values(): IterableIterator<unknown>

Returns ​

IterableIterator<unknown>

Inherited from ​

FoundryCollection.values

MIT licensed.