From 60461291f730ab894ccb3eb0d6d12121d6cf1a10 Mon Sep 17 00:00:00 2001 From: IlanTSnyk Date: Mon, 1 Aug 2022 09:19:00 +0300 Subject: [PATCH] feat: fix TS errors for all scripts --- src/lib/github-enterprise/utils/index.ts | 2 +- src/lib/github/utils/index.ts | 4 ++-- src/lib/gitlab/utils/index.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/github-enterprise/utils/index.ts b/src/lib/github-enterprise/utils/index.ts index e6c1a63..7252d86 100644 --- a/src/lib/github-enterprise/utils/index.ts +++ b/src/lib/github-enterprise/utils/index.ts @@ -56,7 +56,7 @@ export const fetchAllPages = async ( ); } } - const apiResponse = await response.json() as string[]; + const apiResponse = (await response.json()) as string[]; values = values.concat(apiResponse); const nextPage = response.headers.get('link'); if (nextPage && nextPage?.includes('rel="next"')) { diff --git a/src/lib/github/utils/index.ts b/src/lib/github/utils/index.ts index 28d0dc6..dc2da78 100644 --- a/src/lib/github/utils/index.ts +++ b/src/lib/github/utils/index.ts @@ -56,8 +56,8 @@ export const fetchAllPages = async ( ); } } - const apiResponse = await response.json(); - values = values.concat(apiResponse) as string[]; + const apiResponse = (await response.json()) as string[]; + values = values.concat(apiResponse); const nextPage = response.headers.get('link'); if (nextPage && nextPage?.includes('rel="next"')) { const nextPageLink = nextPage diff --git a/src/lib/gitlab/utils/index.ts b/src/lib/gitlab/utils/index.ts index 14ff119..345a403 100644 --- a/src/lib/gitlab/utils/index.ts +++ b/src/lib/gitlab/utils/index.ts @@ -58,8 +58,8 @@ export const fetchAllPages = async ( ); } } - const apiResponse = await response.json(); - values = values.concat(apiResponse) as string[]; + const apiResponse = (await response.json()) as string[]; + values = values.concat(apiResponse); const nextPage = response.headers.get('link'); if (nextPage && nextPage?.includes('rel="next"')) { const nextPageLink = nextPage