Skip to main content Link Search Menu Expand Document (external link)

ProcedureList overview

Added in v1.0.0


Table of contents


combinators

add

Signature

export declare const add: <Req extends Procedure.TaggedRequest.Any>() => {
  <State, Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R2>(
    tag: Req["_tag"],
    handler: Procedure.Handler<Req, Types.NoInfer<State>, Types.NoInfer<Public> | Types.NoInfer<Private>, R2>
  ): <R>(self: ProcedureList<State, Public, Private, R>) => ProcedureList<State, Req | Public, Private, R | R2>
  <State, Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R, R2>(
    self: ProcedureList<State, Public, Private, R>,
    tag: Req["_tag"],
    handler: Procedure.Handler<Req, Types.NoInfer<State>, Types.NoInfer<Public> | Types.NoInfer<Private>, R2>
  ): ProcedureList<State, Req | Public, Private, R | R2>
}

Added in v1.0.0

addPrivate

Signature

export declare const addPrivate: <Req extends Procedure.TaggedRequest.Any>() => {
  <State, Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R2>(
    tag: Req["_tag"],
    handler: Procedure.Handler<Req, Types.NoInfer<State>, Types.NoInfer<Public> | Types.NoInfer<Private>, R2>
  ): <R>(self: ProcedureList<State, Public, Private, R>) => ProcedureList<State, Public, Private | Req, R | R2>
  <State, Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R, R2>(
    self: ProcedureList<State, Public, Private, R>,
    tag: Req["_tag"],
    handler: Procedure.Handler<Req, Types.NoInfer<State>, Types.NoInfer<Public> | Types.NoInfer<Private>, R2>
  ): ProcedureList<State, Public, Private | Req, R | R2>
}

Added in v1.0.0

addProcedure

Signature

export declare const addProcedure: {
  <Req extends Procedure.TaggedRequest.Any, State, R2>(
    procedure: Procedure.Procedure<Req, State, R2>
  ): <Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R>(
    self: ProcedureList<State, Public, Private, R>
  ) => ProcedureList<State, Req | Public, Private, R | R2>
  <
    State,
    Public extends Procedure.TaggedRequest.Any,
    Private extends Procedure.TaggedRequest.Any,
    R,
    Req extends Procedure.TaggedRequest.Any,
    R2
  >(
    self: ProcedureList<State, Public, Private, R>,
    procedure: Procedure.Procedure<Req, State, R2>
  ): ProcedureList<State, Req | Public, Private, R | R2>
}

Added in v1.0.0

addProcedurePrivate

Signature

export declare const addProcedurePrivate: {
  <Req extends Procedure.TaggedRequest.Any, State, R2>(
    procedure: Procedure.Procedure<Req, State, R2>
  ): <Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R>(
    self: ProcedureList<State, Public, Private, R>
  ) => ProcedureList<State, Public, Private | Req, R | R2>
  <
    State,
    Public extends Procedure.TaggedRequest.Any,
    Private extends Procedure.TaggedRequest.Any,
    R,
    Req extends Procedure.TaggedRequest.Any,
    R2
  >(
    self: ProcedureList<State, Public, Private, R>,
    procedure: Procedure.Procedure<Req, State, R2>
  ): ProcedureList<State, Public, Private | Req, R | R2>
}

Added in v1.0.0

withInitialState

Signature

export declare const withInitialState: {
  <State>(
    initialState: Types.NoInfer<State>
  ): <Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R>(
    self: ProcedureList<State, Public, Private, R>
  ) => ProcedureList<State, Public, Private, R>
  <State, Public extends Procedure.TaggedRequest.Any, Private extends Procedure.TaggedRequest.Any, R>(
    self: ProcedureList<State, Public, Private, R>,
    initialState: Types.NoInfer<State>
  ): ProcedureList<State, Public, Private, R>
}

Added in v1.0.0

constructors

make

Signature

export declare const make: <State>(
  initialState: State,
  options?: { readonly identifier?: string }
) => ProcedureList<State, never, never, never>

Added in v1.0.0

models

ProcedureList (interface)

Signature

export interface ProcedureList<
  State,
  Public extends Procedure.TaggedRequest.Any,
  Private extends Procedure.TaggedRequest.Any,
  R
> extends Effect.Effect<ProcedureList<State, Public, Private, R>> {
  readonly [TypeId]: TypeId
  readonly initialState: State
  readonly public: ReadonlyArray<Procedure.Procedure<Public, State, R>>
  readonly private: ReadonlyArray<Procedure.Procedure<Private, State, R>>
  readonly identifier: string
}

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0