Hyperlinkv0.8.0-beta.28

Hyperlink

Hyperlink.Methodinterfacesrc/Hyperlink.ts:422
Method<P, Su, E, Str, Ann, Client>

One method of a resource contract — built by effect / effectFn / Hyperlink.stream. Carries its kind, schemas (payload / success / error), whether it's a stream (a push source vs a one-shot read), and tool annotations. .annotate({...}) returns a copy with merged annotations, mirroring Effect's schema idiom.

For a streaming method, success is the element schema and error is the stream error schema — they become an RpcSchema.Stream on the wire, and the service member surfaces as a Stream rather than an Effect.

modelseffecteffectFnHyperlink.stream
Source src/Hyperlink.ts:42223 lines
export interface Method<
  P extends Schema.Struct.Fields | Schema.Top | undefined,
  Su extends Schema.Top,
  E extends Schema.Top,
  Str extends boolean = false,
  Ann extends MethodAnnotations = MethodAnnotations,
  Client = Derive,
> extends Pipeable.Pipeable {
  readonly [MethodTypeId]: typeof MethodTypeId;
  readonly kind: MethodKind;
  readonly payload: P;
  readonly success: Su;
  readonly error: E;
  /** A streaming read (`Stream` member) when `true`; a one-shot `Effect` otherwise. */
  readonly stream: Str;
  readonly annotations: Ann;
  /** Phantom: an explicit client-facing type (set via the `effect`/`effectFn` two-stage forms). `Derive`
   *  ⇒ the client shape is derived from the schema. Optional + type-only. */
  readonly [clientSym]?: (client: Client) => void;
  readonly annotate: <A extends MethodAnnotations>(
    annotations: A,
  ) => Method<P, Su, E, Str, Ann & A, Client>;
}
Referenced by 12 symbols