Skip to content
5 changes: 4 additions & 1 deletion packages/vue-component-meta/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,10 @@ function createSchemaResolvers(
};
}
function resolveSlotProperties(prop: ts.Symbol): SlotMeta {
const subtype = typeChecker.getTypeOfSymbolAtLocation(typeChecker.getTypeOfSymbolAtLocation(prop, symbolNode!).getCallSignatures()[0].parameters[0], symbolNode!);
const propType = typeChecker.getNonNullableType(typeChecker.getTypeOfSymbolAtLocation(prop, symbolNode!));
const signatures = propType.getCallSignatures();
const paramType = signatures[0].parameters[0];
const subtype = typeChecker.getTypeOfSymbolAtLocation(paramType, symbolNode!);
let schema: PropertyMetaSchema;

return {
Expand Down
2 changes: 2 additions & 0 deletions packages/vue-language-core/src/generators/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ export function generate(

const useGlobalThisTypeInCtx = fileName.endsWith('.html');

codeGen.push(`let __VLS_any: any;\n`);

codeGen.push(`let __VLS_ctx!: ${useGlobalThisTypeInCtx ? 'typeof globalThis &' : ''}`);
if (sfc.scriptSetup) {
codeGen.push(`InstanceType<import('./__VLS_types.js').PickNotAny<typeof __VLS_publicComponent, new () => {}>> & `);
Expand Down
Loading