提交 090c78ff 编写于 作者: fxy060608's avatar fxy060608

fix(types): AsyncApiRes

上级 5dbb3f21
......@@ -54,9 +54,10 @@ type AsyncApiLike = (args: any) => Promise<unknown> | void
type AsyncApiOptions<T extends ApiLike> = Parameters<T>[0]
type AsyncApiRes<T extends AsyncMethodOptionLike> = Parameters<
Exclude<T['success'], undefined>
>[0]
type AsyncApiRes<T extends AsyncMethodOptionLike> = Omit<
Parameters<Exclude<T['success'], undefined>>[0],
'errMsg'
>
type AsyncApiRequired<T extends AsyncMethodOptionLike> = <P extends T>(
args: P
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册