File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,23 @@ Some types are featured from [ESTree].
1313You can use the type definition of this AST:
1414
1515``` ts
16- import {AST } from " vue-eslint-parser"
16+ import { AST } from " vue-eslint-parser"
1717
1818export function create(context ) {
19- context .parserServices .registerTemplateBodyVisitor (context , {
20- VElement(node : AST .VElement ): void {
21- // ...
19+ return context .parserServices .defineTemplateBodyVisitor (
20+ // Event handlers for <template>.
21+ {
22+ VElement(node : AST .VElement ): void {
23+ // ...
24+ }
25+ },
26+ // Event handlers for <script>. (optional)
27+ {
28+ Program(node : AST .ESLintProgram ): void {
29+ // ...
30+ }
2231 }
23- })
24-
25- return {
26- Program(node : AST .ESLintProgram ): void {
27- // ...
28- }
29- }
32+ )
3033}
3134```
3235
You can’t perform that action at this time.
0 commit comments