MCPcopy Index your code
hub / github.com/Effect-TS/effect / addSuccess

Function addSuccess

packages/platform/src/HttpApiEndpoint.ts:755–769  ·  view source on GitHub ↗
(
    this: HttpApiEndpoint.AnyWithProps,
    schema: Schema.Schema.Any,
    annotations?: { readonly status?: number }
  )

Source from the content-addressed store, hash-verified

753 return pipeArguments(this, arguments)
754 },
755 addSuccess(
756 this: HttpApiEndpoint.AnyWithProps,
757 schema: Schema.Schema.Any,
758 annotations?: { readonly status?: number }
759 ) {
760 schema = annotations?.status ?
761 schema.annotations(HttpApiSchema.annotations({ status: annotations.status })) :
762 schema
763 return makeProto({
764 ...this,
765 successSchema: this.successSchema === HttpApiSchema.NoContent ?
766 schema :
767 HttpApiSchema.UnionUnify(this.successSchema, schema)
768 })
769 },
770 addError(this: HttpApiEndpoint.AnyWithProps, schema: Schema.Schema.Any, annotations?: { readonly status?: number }) {
771 return makeProto({
772 ...this,

Callers

nothing calls this directly

Calls 2

makeProtoFunction · 0.70
annotationsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…