Skip to content

Commit

Permalink
fix: omit local components from global components
Browse files Browse the repository at this point in the history
close #1886
  • Loading branch information
johnsoncodehk committed Nov 27, 2022
1 parent cc4288a commit 19cc0f5
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -626,7 +626,8 @@ export function generate(

/* Components */
codeGen.push('/* Components */\n');
codeGen.push(`let __VLS_otherComponents!: NonNullable<typeof __VLS_component extends { components: infer C } ? C : {}> & import('./__VLS_types.js').GlobalComponents & typeof __VLS_componentsOption & typeof __VLS_ctx;\n`);
codeGen.push(`let __VLS_localComponents!: NonNullable<typeof __VLS_component extends { components: infer C } ? C : {}> & typeof __VLS_componentsOption & typeof __VLS_ctx;\n`);
codeGen.push(`let __VLS_otherComponents!: typeof __VLS_localComponents & Omit<import('./__VLS_types.js').GlobalComponents, keyof typeof __VLS_localComponents>;\n`);
codeGen.push(`let __VLS_selfComponent!: import('./__VLS_types.js').SelfComponent<typeof __VLS_name, typeof __VLS_component & (new () => { ${getSlotsPropertyName(vueCompilerOptions.target ?? 3)}: typeof __VLS_slots })>;\n`);
codeGen.push(`let __VLS_components!: typeof __VLS_otherComponents & Omit<typeof __VLS_selfComponent, keyof typeof __VLS_otherComponents>;\n`);

Expand Down

0 comments on commit 19cc0f5

Please sign in to comment.