Closed this issue 4 years ago · 1 comments
目前我们的实现里是将异常当做是参数直接传给resolve的,这样或许不太直观。所以我打算用reject回调将异常变为async function可以catch的异常。
export type ARIA2Result<T> = ArgumentsType<JSONRPCHandler> extends [any, JSONRPCError, ...infer R] ? [T, JSONRPCError, ...R] : any[];
搞定w