ResourceList
T
input values
U
output values
Constructor Function
function ResourceList(items, options, description?): ResourceListBlueprint;
items
Iterable<T>
An iterable of input values.
options.key
(item: T) => any
A function that returns a unique key for each item.
options.create
(item: T) => ResourceBlueprint<U>
A function that creates a resource for each item.
description?
string
A description of the resource.
optional
returns
ResourceListBlueprint
Properties
current
readonly current: U[];
A list of the current values of the resources in the list.
ResourceListBlueprint
bolt Methods
create
create(options): ResourceList;
options.owner
object
The owner of the ResourceList. The lifetime of each member of the list will be linked to this owner. This means that members will be cleaned up when this owner is cleaned up, at the latest.
returns
ResourceList