diff --git a/lib/svg-to-css.js b/lib/svg-to-css.js index c45b035..2509919 100644 --- a/lib/svg-to-css.js +++ b/lib/svg-to-css.js @@ -170,8 +170,8 @@ export function svgAttTransformToCSS(attValue) { } /** - * @param {import('./exactnum.js').ExactNum} tx - * @param {import('./exactnum.js').ExactNum} ty + * @param {import('./types.js').ExactNum} tx + * @param {import('./types.js').ExactNum} ty * @returns {import('./types-css-decl.js').CSSTransFnTranslate} */ function makeCSSTranslate(tx, ty) { diff --git a/lib/types-css-decl.d.ts b/lib/types-css-decl.d.ts index 6abc095..506d97e 100644 --- a/lib/types-css-decl.d.ts +++ b/lib/types-css-decl.d.ts @@ -1,4 +1,4 @@ -import type { ExactNum } from './exactnum.js'; +import type { ExactNum } from './types.js'; export type CSSTypeAngle = { n: ExactNum; diff --git a/lib/types-svg-attr.d.ts b/lib/types-svg-attr.d.ts index c46dd6c..4275e9c 100644 --- a/lib/types-svg-attr.d.ts +++ b/lib/types-svg-attr.d.ts @@ -1,4 +1,4 @@ -import type { ExactNum } from './exactnum.js'; +import type { ExactNum } from './types.js'; export type SVGTransFnMatrix = { name: 'matrix'; diff --git a/lib/types.d.ts b/lib/types.d.ts index b1d3fed..cac0b49 100644 --- a/lib/types.d.ts +++ b/lib/types.d.ts @@ -243,3 +243,12 @@ export type PathDataItem = { }; export type DataUri = 'base64' | 'enc' | 'unenc'; + +export type ExactNum = { + clone(): ExactNum; + getMinifiedString(): string; + isEqualTo(n: ExactNum): boolean; + isZero(): boolean; + negate(): ExactNum; + setNumberOfDigits(d: number): void; +};