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

SerializableProcedureList overview

Added in v1.0.0


Table of contents


combinators

add

Signature

export declare const add: {
  <
    Req extends Schema.TaggedRequest.Any,
    I,
    ReqR,
    State,
    Public extends Schema.TaggedRequest.Any,
    Private extends Schema.TaggedRequest.Any,
    R2
  >(
    schema: any,
    handler: Procedure.Handler<Req, Types.NoInfer<State>, any, R2>
  ): <R>(
    self: SerializableProcedureList<State, Public, Private, R>
  ) => SerializableProcedureList<State, Req | Public, Private, any>
  <
    State,
    Public extends Schema.TaggedRequest.Any,
    Private extends Schema.TaggedRequest.Any,
    R,
    Req extends Schema.TaggedRequest.Any,
    I,
    ReqR,
    R2
  >(
    self: SerializableProcedureList<State, Public, Private, R>,
    schema: any,
    handler: Procedure.Handler<Req, Types.NoInfer<State>, any, R2>
  ): SerializableProcedureList<State, Public | Req, Private, any>
}

Added in v1.0.0

addPrivate

Signature

export declare const addPrivate: {
  <
    Req extends Schema.TaggedRequest.Any,
    I,
    ReqR,
    State,
    Public extends Schema.TaggedRequest.Any,
    Private extends Schema.TaggedRequest.Any,
    R2
  >(
    schema: any,
    handler: Procedure.Handler<Req, Types.NoInfer<State>, any, R2>
  ): <R>(
    self: SerializableProcedureList<State, Public, Private, R>
  ) => SerializableProcedureList<State, Public, Req | Private, any>
  <
    State,
    Public extends Schema.TaggedRequest.Any,
    Private extends Schema.TaggedRequest.Any,
    R,
    Req extends Schema.TaggedRequest.Any,
    I,
    ReqR,
    R2
  >(
    self: SerializableProcedureList<State, Public, Private, R>,
    schema: any,
    handler: Procedure.Handler<Req, Types.NoInfer<State>, any, R2>
  ): SerializableProcedureList<State, Public, Private | Req, any>
}

Added in v1.0.0

withInitialState

Signature

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

Added in v1.0.0

constructors

make

Signature

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

Added in v1.0.0

models

SerializableProcedureList (interface)

Signature

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

Added in v1.0.0