Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

Reply.ts overview

Since v1.0.0


Exports Grouped by Category


guards

isReply

Signature

declare const isReply: (u: unknown) => u is Reply<Rpc.Any>

Source

Since v1.0.0

models

Chunk (class)

Signature

declare class Chunk<R>

Source

Since v1.0.0

emptyFrom (static method)

Signature

declare const emptyFrom: (requestId: Snowflake) => Chunk<Rpc.Any>

Source

Since v1.0.0

schema (static method)

Signature

declare const schema: <R extends Rpc.Any>(rpc: R) => Schema.Schema<Chunk<R>, ChunkEncoded<R>, Rpc.Context<R>>

Source

Since v1.0.0

withRequestId (method)

Signature

declare const withRequestId: (requestId: Snowflake) => Chunk<R>

Source

Since v1.0.0

[TypeId] (property)

Signature

readonly [TypeId]: symbol

Source

Since v1.0.0

ChunkEncoded (interface)

Signature

export interface ChunkEncoded<R extends Rpc.Any> {
  readonly _tag: "Chunk"
  readonly requestId: string
  readonly id: string
  readonly sequence: number
  readonly values: NonEmptyReadonlyArray<Rpc.SuccessChunkEncoded<R>>
}

Source

Since v1.0.0

Reply (type alias)

Signature

type Reply<R> = WithExit<R> | Chunk<R>

Source

Since v1.0.0

ReplyEncoded (type alias)

Signature

type ReplyEncoded<R> = WithExitEncoded<R> | ChunkEncoded<R>

Source

Since v1.0.0

ReplyWithContext (class)

Signature

declare class ReplyWithContext<R>

Source

Since v1.0.0

fromDefect (static method)

Signature

declare const fromDefect: (options: {
  readonly id: Snowflake
  readonly requestId: Snowflake
  readonly defect: unknown
}) => ReplyWithContext<any>

Source

Since v1.0.0

interrupt (static method)

Signature

declare const interrupt: (options: { readonly id: Snowflake; readonly requestId: Snowflake }) => ReplyWithContext<any>

Source

Since v1.0.0

WithExit (class)

Signature

declare class WithExit<R>

Source

Since v1.0.0

schema (static method)

Signature

declare const schema: <R extends Rpc.Any>(rpc: R) => Schema.Schema<WithExit<R>, WithExitEncoded<R>, Rpc.Context<R>>

Source

Since v1.0.0

withRequestId (method)

Signature

declare const withRequestId: (requestId: Snowflake) => WithExit<R>

Source

Since v1.0.0

[TypeId] (property)

Signature

readonly [TypeId]: symbol

Source

Since v1.0.0

WithExitEncoded (interface)

Signature

export interface WithExitEncoded<R extends Rpc.Any> {
  readonly _tag: "WithExit"
  readonly requestId: string
  readonly id: string
  readonly exit: Rpc.ExitEncoded<R>
}

Source

Since v1.0.0

schemas

Encoded

Signature

declare const Encoded: Schema.Union<
  [
    Schema.Struct<{
      _tag: Schema.Literal<["WithExit"]>
      requestId: typeof Schema.String
      id: typeof Schema.String
      exit: typeof Schema.Unknown
    }>,
    Schema.Struct<{
      _tag: Schema.Literal<["Chunk"]>
      requestId: typeof Schema.String
      id: typeof Schema.String
      sequence: typeof Schema.Number
      values: Schema.Array$<typeof Schema.Unknown>
    }>
  ]
>

Source

Since v1.0.0

Reply

Signature

declare const Reply: <R extends Rpc.Any>(rpc: R) => Schema.Schema<Reply<R>, ReplyEncoded<R>, Rpc.Context<R>>

Source

Since v1.0.0

serialization / deserialization

serialize

Signature

declare const serialize: <R extends Rpc.Any>(
  self: ReplyWithContext<R>
) => Effect.Effect<ReplyEncoded<R>, MalformedMessage>

Source

Since v1.0.0

serializeLastReceived

Signature

declare const serializeLastReceived: <R extends Rpc.Any>(
  self: OutgoingRequest<R>
) => Effect.Effect<Option.Option<ReplyEncoded<R>>, MalformedMessage>

Source

Since v1.0.0

type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0