MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeProto

Function makeProto

packages/effect/src/unstable/workflow/Workflow.ts:401–419  ·  view source on GitHub ↗
(options: {
  readonly _tag: Tag
  readonly payloadSchema: Payload
  readonly successSchema: Success
  readonly errorSchema: Error
  readonly annotations: Context.Context<never>
  readonly idempotencyKey: (payload: Payload["Type"]) => string
  readonly suspendedRetrySchedule?: Schedule.Schedule<any, unknown> | undefined
})

Source from the content-addressed store, hash-verified

399}
400
401const makeProto = <
402 const Tag extends string,
403 Payload extends AnyStructSchema,
404 Success extends Schema.Top,
405 Error extends Schema.Top
406>(options: {
407 readonly _tag: Tag
408 readonly payloadSchema: Payload
409 readonly successSchema: Success
410 readonly errorSchema: Error
411 readonly annotations: Context.Context<never>
412 readonly idempotencyKey: (payload: Payload["Type"]) => string
413 readonly suspendedRetrySchedule?: Schedule.Schedule<any, unknown> | undefined
414}): Workflow<Tag, Payload, Success, Error> => {
415 function Workflow() {}
416 Object.setPrototypeOf(Workflow, Proto)
417 Object.assign(Workflow, options)
418 return Workflow as any
419}
420
421/**
422 * Creates a durable workflow definition with schemas, annotations, and

Callers 3

annotateFunction · 0.70
annotateMergeFunction · 0.70
makeFunction · 0.70

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected