Skip to content

Commit

Permalink
fix: update getData function to return specific ToolsData type
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya committed Feb 6, 2025
1 parent 5edede7 commit 4bd3f9c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/tools/extract-tools-github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -10,10 +12,10 @@ dotenv.config();
/**
* Fetches tool data from the GitHub API.
*
* @returns {Promise<any>} The data from the GitHub API.
* @returns {Promise<ToolsData>} The data from the GitHub API.
* @throws {Error} If there is an error fetching the data.
*/
export async function getData(): Promise<any> {
export async function getData(): Promise<ToolsData> {
if (!process.env.GITHUB_TOKEN) {
throw new Error('GITHUB_TOKEN environment variable is required');
}
Expand Down

0 comments on commit 4bd3f9c

Please sign in to comment.