Skip to content

Commit

Permalink
Merge pull request #174 from jan-molak/master
Browse files Browse the repository at this point in the history
Updated type definitions to include the optional headers matcher in onGet, onPost, onPatch, etc. See discussion in #70
  • Loading branch information
ctimmerm committed Dec 25, 2018
2 parents e4d4fed + 592b400 commit d5ea3b6
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 d5ea3b6

Please sign in to comment.