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.
export interface 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>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.
Method<
function (type parameter) P in 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>P extends import SchemaSchema.Struct.type Struct<Fields extends Struct.Fields>.Fields = {
readonly [x: string]: Schema.Constraint;
readonly [x: number]: Schema.Constraint;
readonly [x: symbol]: Schema.Constraint;
}
Constraint for a struct field map: an object whose values are schemas.
Fields | import SchemaSchema.Top | undefined,
function (type parameter) Su in 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>Su extends import SchemaSchema.Top,
function (type parameter) E in 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>E extends import SchemaSchema.Top,
function (type parameter) Str in 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>Str extends boolean = false,
function (type parameter) Ann in 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>Ann extends MethodAnnotations = MethodAnnotations,
function (type parameter) Client in 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>Client = Derive,
> extends import PipeablePipeable.Pipeable {
readonly [const MethodTypeId: "~hyperlink-ts/Hyperlink/Method"Identity brand for a
Method
(Effect-style string TypeId) — distinguishes a spec leaf from a
plain object; guarded with Predicate.hasProperty.
MethodTypeId]: typeof const MethodTypeId: "~hyperlink-ts/Hyperlink/Method"Identity brand for a
Method
(Effect-style string TypeId) — distinguishes a spec leaf from a
plain object; guarded with Predicate.hasProperty.
MethodTypeId;
readonly 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>.kind: MethodKindkind: type MethodKind = "query" | "mutate"MethodKind;
readonly 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>.payload: P extends Schema.Struct.Fields | Schema.Top | undefinedpayload: function (type parameter) P in 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>P;
readonly 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>.success: Su extends Schema.Topsuccess: function (type parameter) Su in 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>Su;
readonly 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>.error: E extends Schema.Toperror: function (type parameter) E in 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>E;
/** A streaming read (`Stream` member) when `true`; a one-shot `Effect` otherwise. */
readonly 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>.stream: Str extends boolean = falseA streaming read (Stream member) when true; a one-shot Effect otherwise.
stream: function (type parameter) Str in 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>Str;
readonly 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>.annotations: Ann extends MethodAnnotations = MethodAnnotationsannotations: function (type parameter) Ann in 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>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 [const clientSym: typeof clientSymPhantom key carrying a method's optional client-type override (set by the effect/effectFn two-stage
forms). Type-only — runtime methods never hold it, so the property is optional.
clientSym]?: (client: Client = Deriveclient: function (type parameter) Client in 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>Client) => void;
readonly 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>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate: <function (type parameter) A in <A extends MethodAnnotations>(annotations: A): Method<P, Su, E, Str, Ann & A, Client>A extends MethodAnnotations>(
annotations: A extends MethodAnnotationsannotations: function (type parameter) A in <A extends MethodAnnotations>(annotations: A): Method<P, Su, E, Str, Ann & A, Client>A,
) => 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>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.
Method<function (type parameter) P in 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>P, function (type parameter) Su in 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>Su, function (type parameter) E in 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>E, function (type parameter) Str in 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>Str, function (type parameter) Ann in 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>Ann & function (type parameter) A in <A extends MethodAnnotations>(annotations: A): Method<P, Su, E, Str, Ann & A, Client>A, function (type parameter) Client in 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>Client>;
}