@vttforge/types / CompendiumCollection
Interface: CompendiumCollection ​
One compendium pack.
Extends ​
FoundryCollection<unknown>
Properties ​
collection ​
readonlycollection:string
contents ​
readonlycontents:unknown[]
The values as an array.
Inherited from ​
index ​
readonlyindex:FoundryCollection<{_id:string;img?:string;name:string;type?:string; }>
locked ​
readonlylocked:boolean
metadata ​
readonlymetadata:object
id ​
readonlyid:string
label ​
readonlylabel:string
packageName ​
readonlypackageName:string
packageType ​
readonlypackageType:string
system? ​
readonlyoptionalsystem?:string
type ​
readonlytype:string
size ​
readonlysize:number
Inherited from ​
Methods ​
[iterator]() ​
[iterator]():
Iterator<unknown,any,any>
Returns ​
Iterator<unknown, any, any>
Inherited from ​
configure() ​
configure(
options):Promise<unknown>
Parameters ​
options ​
Record<string, unknown>
Returns ​
Promise<unknown>
entries() ​
entries():
IterableIterator<[string,unknown]>
Returns ​
IterableIterator<[string, unknown]>
Inherited from ​
every() ​
every(
condition):boolean
Parameters ​
condition ​
(entry) => boolean
Returns ​
boolean
Inherited from ​
filter() ​
filter(
condition):unknown[]
Parameters ​
condition ​
(entry) => boolean
Returns ​
unknown[]
Inherited from ​
find() ​
find(
condition):unknown
Parameters ​
condition ​
(entry) => boolean
Returns ​
unknown
Inherited from ​
forEach() ​
forEach(
fn):void
Parameters ​
fn ​
(entry) => void
Returns ​
void
Inherited from ​
get() ​
get(
key,options?):unknown
Parameters ​
key ​
string
options? ​
strict? ​
boolean
Returns ​
unknown
Inherited from ​
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 ​
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 ​
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<unknown>
Returns ​
IterableIterator<unknown>