Skip to content

@epikodelabs/actionstack


@epikodelabs/actionstack / selectorAsync

Function: selectorAsync()

Call Signature

selectorAsync<S1, R>(s1): (state) => Promise<ResultOf<S1>>

Defined in: selectors.ts:143

Async variadic selector creator.

Rules:

  • selectorAsync(fn) → async projection
  • selectorAsync(a, asyncProjector) → async derived
  • selectorAsync(a, b, asyncProjector) → async derived

Input selectors are synchronous. Only the projector may be async.

Type Parameters

S1

S1 extends AnySelector

R

R

Parameters

s1

S1

Returns

(state): Promise<ResultOf<S1>>

Parameters

state

StateOf<S1>

Returns

Promise<ResultOf<S1>>

Call Signature

selectorAsync<S1, R>(s1, projector): (state) => Promise<R>

Defined in: selectors.ts:150

Async variadic selector creator.

Rules:

  • selectorAsync(fn) → async projection
  • selectorAsync(a, asyncProjector) → async derived
  • selectorAsync(a, b, asyncProjector) → async derived

Input selectors are synchronous. Only the projector may be async.

Type Parameters

S1

S1 extends AnySelector

R

R

Parameters

s1

S1

projector

(r1) => Promise<R>

Returns

(state): Promise<R>

Parameters

state

StateOf<S1>

Returns

Promise<R>

Call Signature

selectorAsync<S1, S2, R>(s1, s2, projector): (state) => Promise<R>

Defined in: selectors.ts:158

Async variadic selector creator.

Rules:

  • selectorAsync(fn) → async projection
  • selectorAsync(a, asyncProjector) → async derived
  • selectorAsync(a, b, asyncProjector) → async derived

Input selectors are synchronous. Only the projector may be async.

Type Parameters

S1

S1 extends AnySelector

S2

S2 extends AnySelector

R

R

Parameters

s1

S1

s2

S2

projector

(r1, r2) => Promise<R>

Returns

(state): Promise<R>

Parameters

state

StateOf<S1>

Returns

Promise<R>

Call Signature

selectorAsync<S1, S2, S3, R>(s1, s2, s3, projector): (state) => Promise<R>

Defined in: selectors.ts:168

Async variadic selector creator.

Rules:

  • selectorAsync(fn) → async projection
  • selectorAsync(a, asyncProjector) → async derived
  • selectorAsync(a, b, asyncProjector) → async derived

Input selectors are synchronous. Only the projector may be async.

Type Parameters

S1

S1 extends AnySelector

S2

S2 extends AnySelector

S3

S3 extends AnySelector

R

R

Parameters

s1

S1

s2

S2

s3

S3

projector

(r1, r2, r3) => Promise<R>

Returns

(state): Promise<R>

Parameters

state

StateOf<S1>

Returns

Promise<R>

Call Signature

selectorAsync<S1, S2, S3, S4, R>(s1, s2, s3, s4, projector): (state) => Promise<R>

Defined in: selectors.ts:180

Async variadic selector creator.

Rules:

  • selectorAsync(fn) → async projection
  • selectorAsync(a, asyncProjector) → async derived
  • selectorAsync(a, b, asyncProjector) → async derived

Input selectors are synchronous. Only the projector may be async.

Type Parameters

S1

S1 extends AnySelector

S2

S2 extends AnySelector

S3

S3 extends AnySelector

S4

S4 extends AnySelector

R

R

Parameters

s1

S1

s2

S2

s3

S3

s4

S4

projector

(r1, r2, r3, r4) => Promise<R>

Returns

(state): Promise<R>

Parameters

state

StateOf<S1>

Returns

Promise<R>

Released under the MIT License.