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

vue-tsc 2.0.13 @vue-ignore not working above template slot #4263

Closed
volarname opened this issue Apr 12, 2024 · 0 comments
Closed

vue-tsc 2.0.13 @vue-ignore not working above template slot #4263

volarname opened this issue Apr 12, 2024 · 0 comments
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@volarname
Copy link

Description

Running vue-tsc on SFC with @vue-ignore above template slot not working on this example:

<template>
  <SomeComponent
    some-prop
  >
    <!-- @vue-ignore -->
    <template #item="{ item: itemSlot }">
      <slot
        name="item"
        :item="itemSlot as any"
      />
    </template>
  </SomeComponent>
</template>

This will return error, example:

src/components/SomeComponentvue:185:36 - error TS7022: 'itemSlot' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
185           <template #item="{ item: itemSlot }">

Expected behaviour

vue-tsc should skip this error as before, (for example it works on version 2.0.7)

Notes

There were more issues with @vue-ignore in versions 2.0.8 - 2.0.12, these were finally fixed in 2.0.13, but this one case still persist in latest version.

@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

2 participants