diff --git a/packages/uni-api/src/helpers/api/index.ts b/packages/uni-api/src/helpers/api/index.ts index 065fdec12d5067f7659c28bea3e1bb36576c65b6..d28b8cd5387a9b43fabf2a5ff919104a6a45b8e8 100644 --- a/packages/uni-api/src/helpers/api/index.ts +++ b/packages/uni-api/src/helpers/api/index.ts @@ -52,7 +52,7 @@ function invokeSuccess(id: number, name: string, res: unknown) { return invokeCallback(id, extend(res || {}, { errMsg: name + ':ok' })) } -function invokeFail(id: number, name: string, errMsg: string, errRes?: any) { +function invokeFail(id: number, name: string, errMsg?: string, errRes?: any) { return invokeCallback( id, Object.assign( @@ -230,7 +230,7 @@ export function defineAsyncApi>( args: Omit, res: { resolve: (res?: AsyncApiRes

) => void - reject: (errMsg: string, errRes?: any) => void + reject: (errMsg?: string, errRes?: any) => void } ) => void, protocol?: ApiProtocols,