Skip to content

Commit

Permalink
Clean up type definitions. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkenny54 authored Oct 22, 2024
1 parent 9db08dc commit 6989185
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/attvalue.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class OpacityValue extends AttValue {
}

/**
* @param {string|AttValue} value
* @param {import('./types.js').SVGAttValue} value
* @returns {OpacityValue}
*/
static getOpacityObj(value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ColorValue extends AttValue {
}

/**
* @param {string|AttValue} value
* @param {import('./types.js').SVGAttValue} value
* @returns {ColorValue}
*/
static getColorObj(value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/css-parse-decl.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class CSSTransformValue extends AttValue {
}

/**
* @param {string|AttValue} value
* @param {import('./types.js').SVGAttValue} value
* @returns {CSSTransformValue}
*/
static getTransformObj(value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/length.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class LengthValue extends AttValue {
}

/**
* @param {string|AttValue} value
* @param {import('./types.js').SVGAttValue} value
* @returns {LengthValue}
*/
static getLengthObj(value) {
Expand Down
2 changes: 1 addition & 1 deletion lib/svg-parse-att.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class SVGTransformValue extends AttValue {
}

/**
* @param {string|AttValue} value
* @param {import('./types.js').SVGAttValue} value
* @returns {SVGTransformValue}
*/
static getTransformObj(value) {
Expand Down
6 changes: 3 additions & 3 deletions lib/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { AttValue } from './attvalue.js';

export type XastDoctype = {
type: 'doctype';
parentNode: XastParent;
Expand Down Expand Up @@ -134,6 +132,8 @@ type CSSFeatures =
| 'pseudos'
| 'simple-selectors';

export class AttValue {}

export class StyleData {
computeOwnStyle(node: XastElement): Map<string, string | null>;
computeParentStyle(
Expand Down Expand Up @@ -184,7 +184,7 @@ export type CSSParsedTransform = {
};

export type CSSPropertyValue = {
value: string | AttValue;
value: SVGAttValue;
important: boolean;
};

Expand Down

0 comments on commit 6989185

Please sign in to comment.