Skip to content

Commit 9308a3d

Browse files
committed
fix: correct ParserServices type
1 parent d0804ec commit 9308a3d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/ast/nodes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { ParseError } from "./errors"
88
import type { HasLocation } from "./locations"
99
import type { Token } from "./tokens"
1010
import type { TSESTree } from "@typescript-eslint/utils"
11+
import type { ParserServices } from "../parser-services"
1112

1213
//------------------------------------------------------------------------------
1314
// Common
@@ -70,7 +71,7 @@ export type ESLintNode =
7071
*/
7172
export interface ESLintExtendedProgram {
7273
ast: ESLintProgram
73-
services?: {}
74+
services?: ParserServices
7475
visitorKeys?: { [type: string]: string[] }
7576
scopeManager?: ScopeManager
7677
}

src/parser-services.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export interface ParserServices {
8383
| ((lang: string | null, customBlock: VElement) => boolean)
8484
create: CustomBlockVisitorFactory
8585
},
86-
scriptVisitor: { [key: string]: (...args: any) => void },
86+
scriptVisitor?: { [key: string]: (...args: any) => void },
8787
): { [key: string]: (...args: any) => void }
8888

8989
/**
@@ -262,7 +262,7 @@ export function define(
262262
| ((lang: string | null, customBlock: VElement) => boolean)
263263
create: CustomBlockVisitorFactory
264264
},
265-
scriptVisitor: { [key: string]: (...args: any) => void },
265+
scriptVisitor?: { [key: string]: (...args: any) => void },
266266
): { [key: string]: (...args: any) => void } {
267267
if (scriptVisitor == null) {
268268
scriptVisitor = {} //eslint-disable-line no-param-reassign

0 commit comments

Comments
 (0)