@@ -70,20 +70,23 @@ for (const nodeType of tsEsNodeNames) {
70
70
argType = `TSESTree.Node & { type: AST_NODE_TYPES.${ nodeType } }` ;
71
71
}
72
72
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
73
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
73
74
}
74
75
for ( const nodeType of svelteNodeNames ) {
75
76
let argType = `AST.${ nodeType } ` ;
76
77
if ( nodeType === 'Program' ) {
77
78
argType = `AST.SvelteProgram` ;
78
79
}
79
80
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
81
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
80
82
}
81
83
typesForNodeCode . push ( `}` ) ;
82
84
typesForNodeCode . push ( `` ) ;
83
85
typesForNodeCode . push ( `export type ESNodeListener = {` ) ;
84
86
for ( const nodeType of esNodeNames ) {
85
87
const argType = `TSESTree.${ nodeType } ` ;
86
88
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
89
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
87
90
estreeCode . push ( `export type ${ nodeType } = TSESTree.${ nodeType } ` ) ;
88
91
}
89
92
for ( const nodeType of esSvelteNodeNames ) {
@@ -92,6 +95,7 @@ for (const nodeType of esSvelteNodeNames) {
92
95
argType = `AST.SvelteProgram` ;
93
96
}
94
97
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
98
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
95
99
}
96
100
typesForNodeCode . push ( `}` ) ;
97
101
typesForNodeCode . push ( `` ) ;
@@ -102,13 +106,15 @@ for (const nodeType of tsNodeNames) {
102
106
argType = `TSESTree.Node & { type: AST_NODE_TYPES.${ nodeType } }` ;
103
107
}
104
108
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
109
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
105
110
}
106
111
typesForNodeCode . push ( `}` ) ;
107
112
typesForNodeCode . push ( `` ) ;
108
113
typesForNodeCode . push ( `export type SvelteNodeListener = {` ) ;
109
114
for ( const nodeType of svelteNodeNames . filter ( ( k ) => ! esSvelteNodeNames . includes ( k ) ) ) {
110
115
const argType = `AST.${ nodeType } ` ;
111
116
typesForNodeCode . push ( ` ${ nodeType } ?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
117
+ typesForNodeCode . push ( ` '${ nodeType } :exit'?: (node: ${ argType } & ASTNodeWithParent) => void` ) ;
112
118
}
113
119
typesForNodeCode . push ( `}` ) ;
114
120
0 commit comments