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

Function status

packages/effect/src/unstable/httpapi/HttpApiSchema.ts:119–122  ·  view source on GitHub ↗
(code: number | StatusLiteral)

Source from the content-addressed store, hash-verified

117 <S extends Schema.Top>(self: S): S["Rebuild"]
118}
119export function status(code: number | StatusLiteral) {
120 const statusCode = typeof code === "string" ? HttpStatus.fromLiteral(code) : code
121 return <S extends Schema.Top>(self: S): S["Rebuild"] => self.annotate({ httpApiStatus: statusCode })
122}
123
124/**
125 * Creates a void schema with the given HTTP status code.

Callers 1

EmptyFunction · 0.85

Calls 1

annotateMethod · 0.65

Tested by

no test coverage detected