File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
packages/experimental/src/rest Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 11import { Schema } from '@rest-hooks/normalizr' ;
22import { EndpointInstance , FetchFunction } from '@rest-hooks/endpoint' ;
33
4- export type RestFetch <
5- P = any ,
6- B = RequestInit [ 'body' ] | Record < string , any > ,
7- R = any ,
8- > = ( this : RestEndpoint , params ?: P , body ?: B , ...rest : any ) => Promise < R > ;
4+ export type RestFetch < P = any , B = any , R = any > = (
5+ this : RestEndpoint ,
6+ params ?: P ,
7+ body ?: B ,
8+ ...rest : any
9+ ) => Promise < R > ;
910
10- export type FetchMutate <
11- P = any ,
12- B = RequestInit [ 'body' ] | Record < string , any > ,
13- R = any ,
14- > = ( this : RestEndpoint , params : P , body : B ) => Promise < R > ;
11+ // eslint-disable-next-line @typescript-eslint/ban-types
12+ export type FetchMutate < P = any , B = { } , R = any > = (
13+ this : RestEndpoint ,
14+ params : P ,
15+ body : B ,
16+ ) => Promise < R > ;
1517
1618export type FetchGet < P = any , R = any > = (
1719 this : RestEndpoint ,
You can’t perform that action at this time.
0 commit comments