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

v-for typing error when used with named slot #1010

Closed
Shayan-To opened this issue Mar 6, 2022 · 3 comments
Closed

v-for typing error when used with named slot #1010

Shayan-To opened this issue Mar 6, 2022 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@Shayan-To
Copy link

This template code always gives me an error on the first line:

<template v-for="abc in ['str1', 'str2']">
    <slot :name="abc" />
</template>

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

@johnsoncodehk
Copy link
Member

Hi @Shayan-To, I can't reproduce this problem, please reproduce complete reproducible vue code.

@Shayan-To
Copy link
Author

@johnsoncodehk
I managed to create a minimal repro: https://gist.github.com/Shayan-To/0e258ea107942c74123ae53966179cb9

@johnsoncodehk johnsoncodehk reopened this Jun 6, 2022
@johnsoncodehk johnsoncodehk added bug Something isn't working and removed need info labels Jun 6, 2022
@johnsoncodehk
Copy link
Member

Duplicate of #1392

@johnsoncodehk johnsoncodehk marked this as a duplicate of #1392 Jun 6, 2022
@johnsoncodehk johnsoncodehk added duplicate This issue or pull request already exists and removed bug Something isn't working labels Jun 6, 2022
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