Refactor: Wakatime card: Use typedef tags to resolve eslint errors (#3037)

This commit is contained in:
Alexandr Garbuzov 2023-08-03 09:01:32 +03:00 committed by GitHub
parent a986fe2b49
commit e3e1495a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,11 +158,16 @@ const recalculatePercentages = (languages) => {
});
};
/**
* @typedef {import('../fetchers/types').WakaTimeData} WakaTimeData
* @typedef {import('./types').WakaTimeOptions} WakaTimeOptions
*/
/**
* Renders WakaTime card.
*
* @param {Partial<import('../fetchers/types').WakaTimeData>} stats WakaTime stats.
* @param {Partial<import('./types').WakaTimeOptions>} options Card options.
* @param {Partial<WakaTimeData>} stats WakaTime stats.
* @param {Partial<WakaTimeOptions>} options Card options.
* @returns {string} WakaTime card SVG.
*/
const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {