From 167b5a616e38be532f1fa782fe5a388bb2af839d Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Tue, 2 Aug 2022 19:30:34 -0400 Subject: [PATCH] Fix the type of 'data' We definitely send more than just Record objects over the CS API, so any is the correct type here. --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4e2d186..33c992e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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): ExpectedRequest => { + public when = (method: HttpMethod, path: string, data?: any): ExpectedRequest => { const pendingReq = new ExpectedRequest(method, path, data); this.expectedRequests.push(pendingReq); return pendingReq; @@ -404,8 +404,8 @@ class ExpectedRequest { constructor( public readonly method: HttpMethod, public readonly path: string, - public readonly data?: Record) { - } + public readonly data?: any, + ) {} public toString = (): string => { return this.method + " " + this.path