Skip to content

Commit

Permalink
fix(styles): fixed missing types on parser services
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Dec 14, 2024
1 parent 385e9ec commit ee0c676
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { KEYS } from "../visitor-keys.js";
import { Context } from "../context/index.js";
import type {
Comment,
SourceLocation,
SvelteProgram,
SvelteScriptElement,
SvelteStyleElement,
Expand All @@ -10,8 +11,11 @@ import type {
import type { Program } from "estree";
import type { ScopeManager } from "eslint-scope";
import { Variable } from "eslint-scope";
import type { Rule } from "postcss";
import type { Root as SelectorRoot } from "postcss-selector-parser";
import type { Rule, Node } from "postcss";
import type {
Node as SelectorNode,
Root as SelectorRoot,
} from "postcss-selector-parser";
import { parseScript, parseScriptInSvelte } from "./script.js";
import type * as SvAST from "./svelte-ast-types.js";
import type * as Compiler from "./svelte-ast-types-for-v5.js";
Expand Down Expand Up @@ -89,6 +93,11 @@ type ParseResult = {
getSvelteHtmlAst: () => SvAST.Fragment | Compiler.Fragment;
getStyleContext: () => StyleContext;
getStyleSelectorAST: (rule: Rule) => SelectorRoot;
styleNodeLoc: (node: Node) => Partial<SourceLocation>;
styleNodeRange: (
node: Node,
) => [number | undefined, number | undefined];
styleSelectorNodeLoc: (node: SelectorNode) => Partial<SourceLocation>;
svelteParseContext: SvelteParseContext;
}
| {
Expand Down

0 comments on commit ee0c676

Please sign in to comment.