@@ -77,11 +77,10 @@ function* generateTemplateCtx(
77
77
emitTypes . push ( `typeof __VLS_modelEmit` ) ;
78
78
}
79
79
if ( emitTypes . length ) {
80
- yield `type __VLS_ResolvedEmit = ${ emitTypes . join ( ' & ' ) } ${ endOfLine } ` ;
81
- exps . push ( `{} as { $emit: __VLS_ResolvedEmit }` ) ;
80
+ exps . push ( `{} as { $emit: ${ emitTypes . join ( ' & ' ) } }` ) ;
82
81
}
83
82
84
- exps . push ( `{} as import(' ${ options . vueCompilerOptions . lib } ').ShallowUnwrapRef<typeof __VLS_bindings> ` ) ;
83
+ exps . push ( `{} as __VLS_Bindings ` ) ;
85
84
86
85
yield `const __VLS_ctx = ` ;
87
86
yield * generateSpreadMerge ( exps ) ;
@@ -185,7 +184,7 @@ function* generateBindings(
185
184
options : ScriptCodegenOptions ,
186
185
ctx : ScriptCodegenContext ,
187
186
) : Generator < Code > {
188
- yield `const __VLS_bindings = {${ newLine } ` ;
187
+ yield `type __VLS_Bindings = __VLS_ProxyRefs< {${ newLine } ` ;
189
188
if ( options . sfc . scriptSetup && options . scriptSetupRanges ) {
190
189
const templateUsageVars = getTemplateUsageVars ( options , ctx ) ;
191
190
for (
@@ -204,13 +203,13 @@ function* generateBindings(
204
203
205
204
const token = Symbol ( varName . length ) ;
206
205
yield [ '' , undefined , 0 , { __linkedToken : token } ] ;
207
- yield `${ varName } : ${ varName } as typeof ` ;
206
+ yield `${ varName } : typeof ` ;
208
207
yield [ '' , undefined , 0 , { __linkedToken : token } ] ;
209
208
yield `${ varName } ,${ newLine } ` ;
210
209
}
211
210
}
212
211
}
213
- yield `}${ endOfLine } ` ;
212
+ yield `}> ${ endOfLine } ` ;
214
213
}
215
214
216
215
function getTemplateUsageVars ( options : ScriptCodegenOptions , ctx : ScriptCodegenContext ) {
0 commit comments