diff --git a/lib/attvalue.js b/lib/attvalue.js index 154961f..6559fd9 100644 --- a/lib/attvalue.js +++ b/lib/attvalue.js @@ -54,7 +54,7 @@ export class OpacityValue extends AttValue { } /** - * @param {string|AttValue} value + * @param {import('./types.js').SVGAttValue} value * @returns {OpacityValue} */ static getOpacityObj(value) { diff --git a/lib/color.js b/lib/color.js index 5af0f67..8a11490 100644 --- a/lib/color.js +++ b/lib/color.js @@ -38,7 +38,7 @@ export class ColorValue extends AttValue { } /** - * @param {string|AttValue} value + * @param {import('./types.js').SVGAttValue} value * @returns {ColorValue} */ static getColorObj(value) { diff --git a/lib/css-parse-decl.js b/lib/css-parse-decl.js index 0055d7b..ccca9a4 100644 --- a/lib/css-parse-decl.js +++ b/lib/css-parse-decl.js @@ -157,7 +157,7 @@ export class CSSTransformValue extends AttValue { } /** - * @param {string|AttValue} value + * @param {import('./types.js').SVGAttValue} value * @returns {CSSTransformValue} */ static getTransformObj(value) { diff --git a/lib/length.js b/lib/length.js index 0ba0853..65154b0 100644 --- a/lib/length.js +++ b/lib/length.js @@ -25,7 +25,7 @@ export class LengthValue extends AttValue { } /** - * @param {string|AttValue} value + * @param {import('./types.js').SVGAttValue} value * @returns {LengthValue} */ static getLengthObj(value) { diff --git a/lib/svg-parse-att.js b/lib/svg-parse-att.js index fddcef1..37999ed 100644 --- a/lib/svg-parse-att.js +++ b/lib/svg-parse-att.js @@ -142,7 +142,7 @@ export class SVGTransformValue extends AttValue { } /** - * @param {string|AttValue} value + * @param {import('./types.js').SVGAttValue} value * @returns {SVGTransformValue} */ static getTransformObj(value) { diff --git a/lib/types.d.ts b/lib/types.d.ts index e616380..957c33e 100644 --- a/lib/types.d.ts +++ b/lib/types.d.ts @@ -1,5 +1,3 @@ -import type { AttValue } from './attvalue.js'; - export type XastDoctype = { type: 'doctype'; parentNode: XastParent; @@ -134,6 +132,8 @@ type CSSFeatures = | 'pseudos' | 'simple-selectors'; +export class AttValue {} + export class StyleData { computeOwnStyle(node: XastElement): Map; computeParentStyle( @@ -184,7 +184,7 @@ export type CSSParsedTransform = { }; export type CSSPropertyValue = { - value: string | AttValue; + value: SVGAttValue; important: boolean; };