Hyperlinkv0.8.0-beta.28

Hyperlink

Hyperlink.unsafeEffectFnfunctionsrc/Hyperlink.ts:1491
<Client = Derive>(): <P extends Schema.Top>(
  payload: RequiredPayloadSchema<P>
) => Method<
  P,
  typeof Schema.Void,
  typeof Schema.Never,
  false,
  MethodAnnotations,
  Client
>

Two-stage effectFn that lets you override the client-facing type with an unconstrained Client: unsafeEffectFn<Client>()(payload). The wire/impl still come from the schema; only what yield* Tag reads is replaced by Client. Unsafe: unlike the narrowing effectFn<Client>() form, Client is not checked against the schema — you assert it matches. Reach for it only when the derivation can't be expressed (e.g. a generic library like the queue, whose correct overloads are unprovable under <F>).

add: Hyperlink.unsafeEffectFn<{
  (item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
  (items: readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>
}>()(itemOrItems)
spec fields
Source src/Hyperlink.ts:149113 lines
export function unsafeEffectFn<Client = Derive>() {
  return <P extends Schema.Top>(
    payload: RequiredPayloadSchema<P>,
  ): Method<P, typeof Schema.Void, typeof Schema.Never, false, MethodAnnotations, Client> =>
    makeMethod<P, typeof Schema.Void, typeof Schema.Never, false, MethodAnnotations, Client>(
      "mutate",
      payload,
      Schema.Void,
      Schema.Never,
      false,
      {},
    );
}
Referenced by 1 symbols