diff --git a/packages/language-core/lib/codegen/script/component.ts b/packages/language-core/lib/codegen/script/component.ts index 6fa3464f2d..2270a2538a 100644 --- a/packages/language-core/lib/codegen/script/component.ts +++ b/packages/language-core/lib/codegen/script/component.ts @@ -125,7 +125,7 @@ function* generatePropsOption( if (options.templateCodegen?.inheritedAttrVars.size) { let attrsType = `__VLS_InheritedAttrs`; if (hasEmitsOption) { - attrsType = `Omit<${attrsType}, \`on\${string}\`>`; + attrsType = `Omit<${attrsType}, keyof __VLS_EmitProps>`; } getOptionCodes.push(() => { const propsType = `__VLS_PickNotAny<${ctx.localTypes.OmitIndexSignature}<${attrsType}>, {}>`; diff --git a/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/child.vue b/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/child.vue new file mode 100644 index 0000000000..8c16eeb0a2 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/child.vue @@ -0,0 +1,7 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/main.vue b/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/main.vue new file mode 100644 index 0000000000..904b334ed8 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/fallthroughAttributes/#5680/main.vue @@ -0,0 +1,8 @@ + + +