From f31416c432bbd5556ff4a5fb65c762ca4219f40e Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:49:45 +0200 Subject: [PATCH] Update run_method.ts --- src/rest/run_method.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest/run_method.ts b/src/rest/run_method.ts index 2ce3d0144..19afefb8c 100644 --- a/src/rest/run_method.ts +++ b/src/rest/run_method.ts @@ -8,7 +8,7 @@ export function runMethod( body?: unknown, retryCount = 0, bucketId?: string | null, -): Promise | undefined { +): Promise { rest.eventHandlers.debug?.("requestCreate", { method, url, @@ -35,7 +35,7 @@ export function runMethod( .then((res) => { if (res.status === 204) return undefined; - return res.json() as T; + return res.json() as unknown as T; }) .catch((error) => { console.error(error);