Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.0 gives errors for slots, that don't exist in 2.1.10 #5200

Closed
patroza opened this issue Feb 20, 2025 · 0 comments
Closed

2.2.0 gives errors for slots, that don't exist in 2.1.10 #5200

patroza opened this issue Feb 20, 2025 · 0 comments
Labels
duplicate This issue or pull request already exists

Comments

@patroza
Copy link

patroza commented Feb 20, 2025

Vue - Official extension or vue-tsc version

2.2.2

VSCode version

1.97.2

Vue version

1.97.2

TypeScript version

5.7.3

System Info

System:
    OS: macOS 15.3
    CPU: (16) arm64 Apple M3 Max
    Memory: 774.89 MB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    pnpm: 10.2.1 - ~/.nvm/versions/node/v22.11.0/bin/pnpm
    bun: 1.2.2 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 133.0.6943.99
    Edge: 133.0.3065.69
    Safari: 18.3

package.json dependencies

Steps to reproduce

try to pass slots into a child:

    <template v-for="(_, name) in $slots" #[name]="slotData">
      <slot :name="name" v-bind="slotData" />
    </template>

What is expected?

No errors

Screen.Recording.2025-02-20.at.10.55.45.mov

What is actually happening?

error TS7022: 'name' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.

12       v-for="(_, name) in $slots
Screen.Recording.2025-02-20.at.10.56.18.mov

Link to minimal reproduction

No response

Any additional comments?

No response

@KazariEX KazariEX added duplicate This issue or pull request already exists and removed pending triage labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants