Skip to content

Commit 8511770

Browse files
committed
fix types
1 parent 6e739d5 commit 8511770

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/plexus-api/src/api.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ApiStore,
44
ApiMethod,
55
PlexusApiConfig,
6-
PlexusApiOptions,
76
PlexusApiReq,
87
PlexusApiRes,
98
PlexusApiSendOptions,
@@ -285,7 +284,7 @@ export class ApiInstance {
285284
get<ResponseType = any>(
286285
path: string,
287286
query?: Record<string, any>,
288-
options?: PlexusApiOptions
287+
options?: PlexusApiSendOptions
289288
) {
290289
const params = new URLSearchParams(query)
291290

@@ -310,7 +309,7 @@ export class ApiInstance {
310309
>(
311310
path: string,
312311
body: BodyType = {} as BodyType,
313-
reqOptions = {} as PlexusApiOptions
312+
reqOptions = {} as PlexusApiSendOptions
314313
) {
315314
const bodyString = typeof body === 'string' ? body : JSON.stringify(body)
316315
const options = {
@@ -341,7 +340,7 @@ export class ApiInstance {
341340
put<ResponseType = any>(
342341
path: string,
343342
body: Record<string, any> | string = {},
344-
options?: PlexusApiOptions
343+
options?: PlexusApiSendOptions
345344
) {
346345
if (typeof body !== 'string') {
347346
body = JSON.stringify(body)
@@ -360,7 +359,7 @@ export class ApiInstance {
360359
delete<ResponseType = any>(
361360
path: string,
362361
body: Record<string, any> | string = {},
363-
options?: PlexusApiOptions
362+
options?: PlexusApiSendOptions
364363
) {
365364
if (typeof body !== 'string') {
366365
body = JSON.stringify(body)
@@ -380,7 +379,7 @@ export class ApiInstance {
380379
patch<ResponseType = any>(
381380
path: string,
382381
body: Record<string, any> | string = {},
383-
options?: PlexusApiOptions
382+
options?: PlexusApiSendOptions
384383
) {
385384
if (typeof body !== 'string') {
386385
body = JSON.stringify(body)
@@ -400,7 +399,7 @@ export class ApiInstance {
400399
gql<ResponseType = any>(
401400
query: string,
402401
variables?: Record<string, any>,
403-
options?: PlexusApiOptions
402+
options?: PlexusApiSendOptions
404403
) {
405404
this._headers.set('Content-Type', 'application/json')
406405

0 commit comments

Comments
 (0)