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 Parameter | Description |
---|---|
K extends Json | Type of keys / inputs. |
V extends Json | Type of values / outputs. |
Params extends DepSafe [] | Types of additional parameters passed to compute . |
Parameters
Parameter | Type | Description |
---|---|---|
compute | (...params ) => LazyCompute <K , V > | Constructor of LazyCompute class to compute entries of the lazy collection. |
...params | Params | Additional parameters to compute . |
Returns
LazyCollection
<K
, V
>
The resulting lazy collection.
jsonExtract()
jsonExtract(value, pattern): Json[]
Parameters
Parameter | Type |
---|---|
value | JsonObject |
pattern | string |
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 Parameter | Description |
---|---|
K extends Json | Type of keys. |
V extends Json | Type of values. |
Parameters
Parameter | Type | Description |
---|---|---|
resource | { identifier : string ; params : Json ; service : string ; } | External resource configuration. |
resource.identifier | string | Identifier of resource managed by the external service. |
resource.params ? | Json | Parameters to supply to the resource. |
resource.service | string | Name 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.