Function
status
(code: number | StatusLiteral)
Source from the content-addressed store, hash-verified
| 117 | <S extends Schema.Top>(self: S): S["Rebuild"] |
| 118 | } |
| 119 | export 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. |
Tested by
no test coverage detected