Skip to content

Regression: fallthroughAttributes now excludes attributes inherited from a child component with props set #6082

Description

@GrantGryczan

Vue - Official extension or vue-tsc version

3.3.3

VSCode version

1.122.0

Vue version

3.5.35

TypeScript version

6.0.3

System Info

  System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 3.00 GB / 15.85 GB
  Binaries:
    Node: 26.2.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.13.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 11.1.3 - C:\Users\grant\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 148.0.7778.179
    Edge: Chromium (140.0.3485.66)
    Firefox: 150.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
    Internet Explorer: 11.0.19041.5794

package.json dependencies

{
  "devDependencies": {
    "typescript": "^6.0.3",
    "vue": "^3.5.35",
    "vue-tsc": "^3.3.3"
  }
}

Steps to reproduce

  1. Clone the minimal reproduction linked below.
  2. Run npm i.
  3. Run npm run check, or open App.vue in VS Code with the Vue extension installed.

What is expected?

There should not be any type errors.

What is actually happening?

> vue-tsc -b --noEmit

App.vue:6:11 - error TS2353: Object literal may only specify known properties, and 'optional' does not exist in type '{ readonly style?: unknown; readonly key?: PropertyKey | undefined; readonly ref?: VNodeRef | undefined; readonly class?: unknown; readonly ref_for?: boolean | undefined; ... 6 more ...; readonly onVnodeUnmounted?: VNodeMountHook | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomP...'.

6   <Parent optional="override" />
            ~~~~~~~~

App.vue:7:11 - error TS2353: Object literal may only specify known properties, and 'required' does not exist in type '{ readonly style?: unknown; readonly key?: PropertyKey | undefined; readonly ref?: VNodeRef | undefined; readonly class?: unknown; readonly ref_for?: boolean | undefined; ... 6 more ...; readonly onVnodeUnmounted?: VNodeMountHook | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomP...'.

7   <Parent required="override" />
            ~~~~~~~~


Found 2 errors.

Link to minimal reproduction

https://github.com/GrantGryczan/vue-language-tools-issue

Any additional comments?

I suspect this regression is related to the addition of the checkRequiredFallthroughAttributes Vue compiler option, but that's just a guess. That option doesn't need to be enabled for the bug to occur. This wasn't an issue a few months ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good reproduction ✨This issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions