diff --git a/src/octokit.ts b/src/octokit.ts index 94605f53..b5758096 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -10,7 +10,7 @@ type OctokitInstanceType = InstanceType & paginateGraphQLI let octokitInstance: OctokitInstanceType | null = null; -function getOctokitInstance() { +function getOctokitInstance(): OctokitInstanceType { if (!octokitInstance) { octokitInstance = new customOctokit({ auth: program.authToken, @@ -18,9 +18,9 @@ function getOctokitInstance() { retries: configuration.dataCollection.maxAttempts, retryAfterBaseValue: configuration.dataCollection.delayMs, }, - }) as OctokitInstanceType; + }); } - return octokitInstance as OctokitInstanceType; + return octokitInstance; } export { getOctokitInstance };