Skip to content
On this page

ResourceList

T

input values

U

output values

Constructor Function

function ResourceList(items, options, description?): ResourceListBlueprint;
itemsIterable<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

returnsResourceListBlueprint

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.ownerobject

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.

returnsResourceList

Released under the MIT license