@@ -60,7 +60,7 @@ function* generateTemplateElements(): Generator<Code> {
60
60
}
61
61
62
62
function * generateTemplateComponents ( options : ScriptCodegenOptions ) : Generator < Code > {
63
- const types : Code [ ] = [ ] ;
63
+ const types : Code [ ] = [ `typeof __VLS_ctx` ] ;
64
64
65
65
if ( options . sfc . script && options . scriptRanges ?. exportDefault ?. componentsOption ) {
66
66
const { componentsOption } = options . scriptRanges . exportDefault ;
@@ -75,8 +75,6 @@ function* generateTemplateComponents(options: ScriptCodegenOptions): Generator<C
75
75
types . push ( `typeof __VLS_componentsOption` ) ;
76
76
}
77
77
78
- types . push ( `typeof __VLS_ctx` ) ;
79
-
80
78
yield `type __VLS_LocalComponents =` ;
81
79
for ( const type of types ) {
82
80
yield ` & ` ;
@@ -88,7 +86,7 @@ function* generateTemplateComponents(options: ScriptCodegenOptions): Generator<C
88
86
}
89
87
90
88
export function * generateTemplateDirectives ( options : ScriptCodegenOptions ) : Generator < Code > {
91
- const types : Code [ ] = [ ] ;
89
+ const types : Code [ ] = [ `typeof __VLS_ctx` ] ;
92
90
93
91
if ( options . sfc . script && options . scriptRanges ?. exportDefault ?. directivesOption ) {
94
92
const { directivesOption } = options . scriptRanges . exportDefault ;
@@ -100,11 +98,9 @@ export function* generateTemplateDirectives(options: ScriptCodegenOptions): Gene
100
98
codeFeatures . navigation ,
101
99
] ;
102
100
yield endOfLine ;
103
- types . push ( `typeof __VLS_directivesOption` ) ;
101
+ types . push ( `__VLS_ResolveDirectives< typeof __VLS_directivesOption> ` ) ;
104
102
}
105
103
106
- types . push ( `typeof __VLS_ctx` ) ;
107
-
108
104
yield `type __VLS_LocalDirectives =` ;
109
105
for ( const type of types ) {
110
106
yield ` & ` ;
0 commit comments