Skip to content

Commit

Permalink
Fix the type of 'data'
Browse files Browse the repository at this point in the history
We definitely send more than just Record<string, string> objects over
the CS API, so any is the correct type here.
  • Loading branch information
robintown committed Aug 2, 2022
1 parent 03fb658 commit 167b5a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class HttpBackend {
* @param {Object} data The expected data.
* @return {Request} An expected request.
*/
public when = (method: HttpMethod, path: string, data?: Record<string, string>): ExpectedRequest => {
public when = (method: HttpMethod, path: string, data?: any): ExpectedRequest => {
const pendingReq = new ExpectedRequest(method, path, data);
this.expectedRequests.push(pendingReq);
return pendingReq;
Expand Down Expand Up @@ -404,8 +404,8 @@ class ExpectedRequest {
constructor(
public readonly method: HttpMethod,
public readonly path: string,
public readonly data?: Record<string, string>) {
}
public readonly data?: any,
) {}

public toString = (): string => {
return this.method + " " + this.path
Expand Down

0 comments on commit 167b5a6

Please sign in to comment.