跳到内容

tsoa-next / @tsoa-next/runtime / TsoaResponse

类型别名: TsoaResponse<T, BodyType, HeaderType, ReturnType> ​

ts
type TsoaResponse<T, BodyType, HeaderType, ReturnType> = (status, data, headers?) => ReturnType;

定义如下: packages/runtime/src/interfaces/response.ts:77

响应函数形状 Res。 。 。 。

使用状态代码、有效载荷和可选头调用函数来短路操作并发送打出的答复。

类型参数 ​

T ​

T 增编 HttpStatusCodeLiteral

BodyType ​

BodyType

HeaderType ​

HeaderType 增编 IsValidHeader<HeaderType> =: object

ReturnType ​

ReturnType = never

参数 ​

status ​

T

data ​

BodyType

headers? ​

HeaderType

回返 ​

ReturnType

贡献者

暂无相关贡献者

页面历史

暂无最近变更历史

以 TypeScript 为先的 OpenAPI 生成、路由生成与运行时验证。