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] v1.6.0 throws error for <component /> #2743

Closed
Ky6uk opened this issue Apr 27, 2023 · 1 comment
Closed

[vue-tsc] v1.6.0 throws error for <component /> #2743

Ky6uk opened this issue Apr 27, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Ky6uk
Copy link

Ky6uk commented Apr 27, 2023

Code that throws the error:

<template>
  <component
    :is="as"
    :class="$style.component"
  >
    <slot />
  </component>
</template>
2:4 - error TS2345: Argument of type '{ class: string; }' is not assignable to parameter of type 'string & Record<string, unknown>'.
  Type '{ class: string; }' is not assignable to type 'string'.

vue-tsc v1.2.0 handles it correctly.

@johnsoncodehk
Copy link
Member

Duplicate of #2725

@johnsoncodehk johnsoncodehk marked this as a duplicate of #2725 Apr 27, 2023
@johnsoncodehk johnsoncodehk closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Apr 27, 2023
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