diff --git a/src/fetchers/top-languages-fetcher.js b/src/fetchers/top-languages-fetcher.js index b57d901afb0a77..1f386c1df682a8 100644 --- a/src/fetchers/top-languages-fetcher.js +++ b/src/fetchers/top-languages-fetcher.js @@ -8,12 +8,17 @@ import { wrapTextMultiline, } from "../common/utils.js"; +/** + * @typedef {import("axios").AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import("axios").AxiosResponse} AxiosResponse Axios response. + */ + /** * Top languages fetcher object. * - * @param {import('axios').AxiosRequestHeaders} variables Fetcher variables. + * @param {AxiosRequestHeaders} variables Fetcher variables. * @param {string} token GitHub token. - * @returns {Promise} Languages fetcher response. + * @returns {Promise} Languages fetcher response. */ const fetcher = (variables, token) => { return request( @@ -47,12 +52,18 @@ const fetcher = (variables, token) => { ); }; +/** + * @typedef {import("./types").TopLangData} TopLangData Top languages data. + */ + /** * Fetch top languages for a given username. * * @param {string} username GitHub username. * @param {string[]} exclude_repo List of repositories to exclude. - * @returns {Promise} Top languages data. + * @param {number} size_weight Weightage to be given to size. + * @param {number} count_weight Weightage to be given to count. + * @returns {Promise} Top languages data. */ const fetchTopLanguages = async ( username,