PriorityAddMethodWire add member — tuple payload surfaced as add(item, lane?).
export type type PriorityAddMethod = Hyperlink.Method<
Schema.Tuple<readonly [Schema.Top, Schema.Top]>,
Schema.Void,
Schema.Never,
false,
PriorityPairAnnotations,
Hyperlink.Derive
>
Wire add member — tuple payload surfaced as add(item, lane?).
PriorityAddMethod = 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 HyperService 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<
import SchemaSchema.interface Tuple<Elements extends Schema.Tuple.Elements>Defines a fixed-length tuple schema from an array of element schemas.
Example (Defining a pair of string and number)
import { Schema } from "effect"
const schema = Schema.Tuple([Schema.String, Schema.Number])
const pair = Schema.decodeUnknownSync(schema)(["hello", 42])
console.log(pair)
// [ 'hello', 42 ]
Namespace for Tuple type utilities.
Details
Tuple.Elements — constraint for the element schema array
Tuple.Type<E> — decoded tuple type
Tuple.Encoded<E> — encoded tuple type
Tuple.MakeIn<E> — constructor input tuple
Type-level representation returned by
Tuple
.
Tuple<readonly [import SchemaSchema.Top, import SchemaSchema.Top]>,
import SchemaSchema.Void,
import SchemaSchema.Never,
false,
type PriorityPairAnnotations =
Hyperlink.MethodAnnotations & {
readonly callStyle: "pair"
}
PriorityPairAnnotations
>;