<Client = Derive>(): <Su extends Schema.Top>(
success: Su
) => Method<
undefined,
Su,
typeof Schema.Never,
false,
MethodAnnotations,
Client
>Two-stage effect that lets you override the client-facing type with an unconstrained
Client — here an Effect type (a read surfaces as Effect<Success>, not a function):
unsafeEffect<Client>()(success). The wire/impl stay schema-derived; only what yield* Tag reads is
replaced by Client. Unsafe: Client is not checked against the schema — you assert it matches.
For a narrowing (checked) read override, use the two-stage effect form instead.
export function function unsafeEffect<
Client = Derive
>(): <Su extends Schema.Top>(
success: Su
) => Method<
undefined,
Su,
typeof Schema.Never,
false,
MethodAnnotations,
Client
>
Two-stage
effect
that lets you override the client-facing type with an unconstrained
Client — here an Effect type (a read surfaces as Effect<Success>, not a function):
unsafeEffect<Client>()(success). The wire/impl stay schema-derived; only what yield* Tag reads is
replaced by Client. Unsafe: Client is not checked against the schema — you assert it matches.
For a narrowing (checked) read override, use the two-stage
effect
form instead.
unsafeEffect<function (type parameter) Client in unsafeEffect<Client = Derive>(): <Su extends Schema.Top>(success: Su) => Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Client = Derive>() {
return <function (type parameter) Su in <Su extends Schema.Top>(success: Su): Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Su extends import SchemaSchema.Top>(
success: Su extends Schema.Topsuccess: function (type parameter) Su in <Su extends Schema.Top>(success: Su): Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Su,
): 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<undefined, function (type parameter) Su in <Su extends Schema.Top>(success: Su): Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Su, typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never, false, MethodAnnotations, function (type parameter) Client in unsafeEffect<Client = Derive>(): <Su extends Schema.Top>(success: Su) => Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Client> =>
const makeMethod: <
P extends
| Schema.Struct.Fields
| Schema.Top
| undefined,
Su extends Schema.Top,
E extends Schema.Top,
Str extends boolean,
Ann extends MethodAnnotations = MethodAnnotations,
Client = Derive
>(
kind: MethodKind,
payload: P,
success: Su,
error: E,
stream: Str,
annotations: Ann
) => Method<P, Su, E, Str, Ann, Client>
The single
Method
constructor —
effect
,
effectFn
,
constant
,
value
, and
stream
all go through it.
makeMethod<undefined, function (type parameter) Su in <Su extends Schema.Top>(success: Su): Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Su, typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never, false, MethodAnnotations, function (type parameter) Client in unsafeEffect<Client = Derive>(): <Su extends Schema.Top>(success: Su) => Method<undefined, Su, typeof Schema.Never, false, MethodAnnotations, Client>Client>(
"query",
var undefinedundefined,
success: Su extends Schema.Topsuccess,
import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never,
false,
{},
);
}