Skip to main content

Context

Skip Runtime internal state.

Extends

Methods

createLazyCollection()

createLazyCollection<K, V, Params>(compute, ...params): LazyCollection<K, V>

Create a lazy reactive collection.

Type Parameters

Type ParameterDescription
K extends JsonType of keys / inputs.
V extends JsonType of values / outputs.
Params extends DepSafe[]Types of additional parameters passed to compute.

Parameters

ParameterTypeDescription
compute(...params) => LazyCompute<K, V>Constructor of LazyCompute class to compute entries of the lazy collection.
...paramsParamsAdditional parameters to compute.

Returns

LazyCollection<K, V>

The resulting lazy collection.


jsonExtract()

jsonExtract(value, pattern): Json[]

Parameters

ParameterType
valueJsonObject
patternstring

Returns

Json[]


useExternalResource()

useExternalResource<K, V>(resource): EagerCollection<K, V>

Create an eager reactive collection populated from a resource managed by an external service.

Type Parameters

Type ParameterDescription
K extends JsonType of keys.
V extends JsonType of values.

Parameters

ParameterTypeDescription
resource{ identifier: string; params: Json; service: string; }External resource configuration.
resource.identifierstringIdentifier of resource managed by the external service.
resource.params?JsonParameters to supply to the resource.
resource.servicestringName of the external service, which must be a key in the externalServices field of the SkipService to which this Context belongs.

Returns

EagerCollection<K, V>

An eager reactive collection of the external resource.