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 1.6.5: leave-active-class does not exist in type TransitionProps #3255

Closed
akarmes opened this issue Jun 6, 2023 · 6 comments
Closed
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@akarmes
Copy link

akarmes commented Jun 6, 2023

Package versions:

  • vue-tsc 1.6.5
  • typescript 5.1.3
  • vue 3.3.4

After updating typescript 5.0.4 => 5.1.3, vue-tsc shows following error for Transition attributes:

error TS2345: Argument of type '{ name: string; leaveActiveClass: string; "leave-active-class": string; }' is not assignable to parameter of type 'TransitionProps'.
  Object literal may only specify known properties, and '"leave-active-class"' does not exist in type 'TransitionProps'.

3     <Transition name="saving" leave-active-class="foobar">

Related code looks this way:

<template>
  <Teleport to="body">
    <Transition name="saving" leave-active-class="foobar">
  ...
@fanckush
Copy link

fanckush commented Jun 6, 2023

same problem

@vieruuuu
Copy link

vieruuuu commented Jun 7, 2023

bump

@johnsoncodehk
Copy link
Member

TS 5.1.3 is not supported yet, the following IsAny use cases are broken in 5.1.x.
https://github.com/vuejs/language-tools/blob/23d518751555d6867f7d7e929b13335578b656a0/packages/vue-language-core/src/utils/directorySharedTypes.ts#L21C13-L26

@jd-solanki
Copy link
Contributor

Hi @johnsoncodehk

I'm also getting a similar error and I realized that this is because vue-tsc now complains if prop is in kebab-case. @akarmes @fanckush try converting prop name to camelCase and probably error will get resolved. However, I have eslint setup and it auto converts the prop to kebab-case.

@jd-solanki
Copy link
Contributor

With kebab-case:
image

With camelCase (no error):
image

@QiuFeng54321
Copy link

QiuFeng54321 commented Jun 12, 2023

Seems like generic components all have this issue as in #3256 .

@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 Jun 14, 2023
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

6 participants