diff --git a/test/types/mock-interceptor.test-d.ts b/test/types/mock-interceptor.test-d.ts index 24d29e11206..d246e2600a7 100644 --- a/test/types/mock-interceptor.test-d.ts +++ b/test/types/mock-interceptor.test-d.ts @@ -37,7 +37,12 @@ expectAssignable(mockResponseCall trailers: { foo: 'bar' } }}))) mockInterceptor.reply((options) => { + expectAssignable(options.path); + expectAssignable(options.method); expectAssignable(options.headers); + expectAssignable(options.origin); + expectAssignable(options.body); + expectAssignable(options.maxRedirections); return { statusCode: 200, data: { foo: 'bar' } } }) diff --git a/types/mock-interceptor.d.ts b/types/mock-interceptor.d.ts index 6b3961c0482..33f3f14d1bf 100644 --- a/types/mock-interceptor.d.ts +++ b/types/mock-interceptor.d.ts @@ -71,11 +71,11 @@ declare namespace MockInterceptor { export interface MockResponseCallbackOptions { path: string; - origin: string; method: string; - body?: BodyInit | Dispatcher.DispatchOptions['body']; - headers: Headers | Record; - maxRedirections: number; + headers?: Headers | Record; + origin?: string; + body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; + maxRedirections?: number; } export type MockResponseDataHandler = (