2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-12 13:47:49 +00:00

fix: overload declaration for calculateSize in Utils

This commit is contained in:
Vjacheslav Trushkin 2022-11-25 18:54:13 +02:00
parent 8b2aeff300
commit 60541cffb7

View File

@ -7,6 +7,21 @@ const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
/**
* Calculate second dimension when only 1 dimension is set
*/
export function calculateSize(
size: string,
ratio: number,
precision?: number
): string;
export function calculateSize(
size: number,
ratio: number,
precision?: number
): number;
export function calculateSize(
size: string | number,
ratio: number,
precision?: number
): string | number;
export function calculateSize(
size: string | number,
ratio: number,