@@ -17,6 +17,7 @@ import type {
1717 RuleDefinition ,
1818 RuleDefinitionTypeOptions ,
1919 RuleVisitor ,
20+ SourceLocation ,
2021 TextSourceCode ,
2122} from "@eslint/core" ;
2223
@@ -58,23 +59,27 @@ export type RuleType = "problem" | "suggestion" | "layout";
5859/**
5960 * The `SourceCode` interface for Markdown files.
6061 */
61- export interface IMarkdownSourceCode extends TextSourceCode {
62+ export interface IMarkdownSourceCode
63+ extends TextSourceCode < {
64+ LangOptions : { } ;
65+ RootNode : Root ;
66+ SyntaxElementWithLoc : Node ;
67+ ConfigNode : { value : string ; position : SourceLocation } ;
68+ } > {
6269 /**
6370 * Gets the entire source text split into an array of lines.
64- * @returns {Array<string> } The source text as an array of lines.
65- * @public
71+ * @returns The source text as an array of lines.
6672 */
6773 get lines ( ) : Array < string > ;
6874
6975 /**
7076 * Gets the source code for the given node.
71- * @param {object } [node] The AST node to get the text for.
72- * @param {number } [beforeCount] The number of characters before the node to retrieve.
73- * @param {number } [afterCount] The number of characters after the node to retrieve.
74- * @returns {string } The text representing the AST node.
75- * @public
77+ * @param node The AST node to get the text for.
78+ * @param beforeCount The number of characters before the node to retrieve.
79+ * @param afterCount The number of characters after the node to retrieve.
80+ * @returns The text representing the AST node.
7681 */
77- getText ( node ?: object , beforeCount ?: number , afterCount ?: number ) : string ;
82+ getText ( node ?: Node , beforeCount ?: number , afterCount ?: number ) : string ;
7883}
7984
8085export interface MarkdownRuleVisitor
0 commit comments