Skip to content

Commit

Permalink
feature: add dispatchReturns
Browse files Browse the repository at this point in the history
  • Loading branch information
savchenko alexander committed Apr 25, 2021
1 parent c1ce9dd commit 2de9278
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/type.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import { IStringifyOptions } from 'qs'

declare module '@savchenko91/rc-redux-api-mw/dist/type.d' {
export interface APIAction<ResponseBody = unknown, RequestBody = unknown, Payload = unknown>
extends Omit<RequestInit, 'headers' | 'body'> {
type ActionName = 'endAction' | 'APIAction'

export interface APIAction<
ResponseBody = unknown,
RequestBody = unknown,
Payload = unknown,
DispatchReturns extends ActionName = 'APIAction'
> extends Omit<RequestInit, 'headers' | 'body'> {
url: string
type: string
returnResponse?: boolean
dispatchReturns?: DispatchReturns
headers?: APIHeaders
body?: RequestBody
responseBodyType?: ResponseBodyType
Expand Down

0 comments on commit 2de9278

Please sign in to comment.