diff --git a/src/gh.ts b/src/gh.ts index 39e1e34..82c4305 100644 --- a/src/gh.ts +++ b/src/gh.ts @@ -120,7 +120,7 @@ interface ObjectWithPerPage { } async function paginate( - method: (args: TFirstParam) => ResponseWithPaginationAndMeta, + method: (args: TFirstParam) => Promise>, args: TFirstParam ): Promise> { @@ -151,8 +151,8 @@ async function fetchRepoNameWithBranches( const branchesResponse: ResponseWithDataArray = await paginate( - (tmpFirstParam: rest.ReposGetBranchesParams): ResponseFromGetBranches => { - return octokit.repos.getBranches(tmpFirstParam) as any as ResponseFromGetBranches; + (tmpFirstParam: rest.ReposGetBranchesParams): Promise => { + return octokit.repos.getBranches(tmpFirstParam) as any as Promise; }, params ); @@ -289,8 +289,8 @@ async function fetchUnusedForkedRepos() { const repos: ResponseWithDataArray = await paginate( - (tmpFirstParam: rest.ReposGetForUserParams): ResponseFromGetUserRepo => { - return octokit.repos.getForUser(tmpFirstParam) as any as ResponseFromGetUserRepo; + (tmpFirstParam: rest.ReposGetForUserParams): Promise => { + return octokit.repos.getForUser(tmpFirstParam) as any as Promise; }, params );