( schema: Schema.Top, headers: Schema.Top | Schema.Struct.Fields )
| 555 | headers: H |
| 556 | ): WithHeaders<S, H> |
| 557 | export function WithHeaders( |
| 558 | schema: Schema.Top, |
| 559 | headers: Schema.Top | Schema.Struct.Fields |
| 560 | ): WithHeaders<Schema.Top, Schema.Top> { |
| 561 | if (isWithHeaders(schema)) { |
| 562 | throw new Error("WithHeaders schemas cannot be nested") |
| 563 | } |
| 564 | return Schema.make<WithHeaders<Schema.Top, Schema.Top>>(withHeadersValueSchema.ast, { |
| 565 | [WithHeadersTypeId]: WithHeadersTypeId, |
| 566 | schema, |
| 567 | headers: Schema.isSchema(headers) ? headers : Schema.Struct(headers) |
| 568 | }) |
| 569 | } |
| 570 | |
| 571 | /** |
| 572 | * Constructs a `WithHeaders` response value from a body and headers. |
nothing calls this directly
no test coverage detected