From ba810d7038b20e7dfb0918fcdcf3c6d5dad26268 Mon Sep 17 00:00:00 2001 From: Brett Dargan Date: Tue, 4 Apr 2023 09:10:37 +1000 Subject: [PATCH 1/2] add signal cast --- src/templates/core/fetch/sendRequest.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/core/fetch/sendRequest.hbs b/src/templates/core/fetch/sendRequest.hbs index 73f71f428..093b83eb1 100644 --- a/src/templates/core/fetch/sendRequest.hbs +++ b/src/templates/core/fetch/sendRequest.hbs @@ -13,7 +13,7 @@ export const sendRequest = async ( headers, body: body ?? formData, method: options.method, - signal: controller.signal, + signal: controller.signal as AbortSignal, }; if (config.WITH_CREDENTIALS) { From 4feee452263b259d2c02e9fd2aa15111239687e8 Mon Sep 17 00:00:00 2001 From: Brett Dargan Date: Tue, 4 Apr 2023 09:37:19 +1000 Subject: [PATCH 2/2] AbortSignal test snapshot --- test/__snapshots__/index.spec.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/__snapshots__/index.spec.ts.snap b/test/__snapshots__/index.spec.ts.snap index eefa4ffe0..03cc781c9 100644 --- a/test/__snapshots__/index.spec.ts.snap +++ b/test/__snapshots__/index.spec.ts.snap @@ -436,7 +436,7 @@ export const sendRequest = async ( headers, body: body ?? formData, method: options.method, - signal: controller.signal, + signal: controller.signal as AbortSignal, }; if (config.WITH_CREDENTIALS) { @@ -3529,7 +3529,7 @@ export const sendRequest = async ( headers, body: body ?? formData, method: options.method, - signal: controller.signal, + signal: controller.signal as AbortSignal, }; if (config.WITH_CREDENTIALS) {