Skip to content

Commit

Permalink
Updated type definitions to include the optional headers matcher in o…
Browse files Browse the repository at this point in the history
…nGet, onPost, onPatch, etc. See #70
  • Loading branch information
jan-molak committed Nov 3, 2018
1 parent 8681af9 commit 592b400
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/index.d.ts
Expand Up @@ -26,7 +26,11 @@ interface RequestDataMatcher {
};
}

type RequestMatcherFunc = (matcher?: string | RegExp, body?: string | RequestDataMatcher) => RequestHandler;
interface HeadersMatcher {
[header: string]: string;
}

type RequestMatcherFunc = (matcher?: string | RegExp, body?: string | RequestDataMatcher, headers?: HeadersMatcher) => RequestHandler;

declare class MockAdapter {
constructor(axiosInstance: AxiosInstance, options?: MockAdapterOptions);
Expand Down

0 comments on commit 592b400

Please sign in to comment.