1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-29 20:21:14 +03:00

chore: migrate plugin types to plugin (#2111)

This commit is contained in:
Seth Falco
2025-04-30 02:16:53 +01:00
committed by GitHub
parent 0ff7f24092
commit 4573d0178e
60 changed files with 399 additions and 387 deletions

View File

@ -1,5 +1,13 @@
import { removeLeadingZero } from '../lib/svgo/tools.js';
/**
* @typedef CleanupNumericValuesParams
* @property {number=} floatPrecision
* @property {boolean=} leadingZero
* @property {boolean=} defaultPx
* @property {boolean=} convertToPx
*/
export const name = 'cleanupNumericValues';
export const description =
'rounds numeric values to the fixed precision, removes default px units';
@ -23,7 +31,7 @@ const absoluteLengths = {
*
* @author Kir Belevich
*
* @type {import('./plugins-types.js').Plugin<'cleanupNumericValues'>}
* @type {import('../lib/types.js').Plugin<CleanupNumericValuesParams>}
*/
export const fn = (_root, params) => {
const {