From 4bd3f9cfd335d5255e2931c57d61201b8d2529f0 Mon Sep 17 00:00:00 2001 From: JeelRajodiya Date: Thu, 6 Feb 2025 23:24:00 +0530 Subject: [PATCH] fix: update getData function to return specific ToolsData type --- scripts/tools/extract-tools-github.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/tools/extract-tools-github.ts b/scripts/tools/extract-tools-github.ts index 67e4b10f0e72..a449252f08f8 100644 --- a/scripts/tools/extract-tools-github.ts +++ b/scripts/tools/extract-tools-github.ts @@ -2,6 +2,8 @@ import axios from 'axios'; import dotenv from 'dotenv'; +import type { ToolsData } from '@/types/scripts/tools'; + import { pause } from '../utils'; import { logger } from '../utils/logger'; @@ -10,10 +12,10 @@ dotenv.config(); /** * Fetches tool data from the GitHub API. * - * @returns {Promise} The data from the GitHub API. + * @returns {Promise} The data from the GitHub API. * @throws {Error} If there is an error fetching the data. */ -export async function getData(): Promise { +export async function getData(): Promise { if (!process.env.GITHUB_TOKEN) { throw new Error('GITHUB_TOKEN environment variable is required'); }