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

:class="[]" binding throws (false positive?) on type 'IntrinsicAttributes' #148

Closed
TheDutchCoder opened this issue Jan 7, 2021 · 2 comments
Labels
blocked Blocked on some dependency bug Something isn't working Stale

Comments

@TheDutchCoder
Copy link

Describe the bug
When binding classes with the array syntax like so:

:class="[textClasses, marginClasses]"

The plugin throws an error:

Type '{ class: string[]; }' is not assignable to type 'IntrinsicAttributes'.
  Property 'class' does not exist on type 'IntrinsicAttributes'.VueDX/TS(2322)

To Reproduce
Steps to reproduce the behavior:

  1. Add class binding with array syntax
  2. See error

Expected behavior
The plugin to not throw an error.

Info (please complete the following information):

  • OS MacOS 10.15.7
  • IDE VSCode
  • TypeScript Version 3.9.3
  • Vue Version: 3.0.0
@TheDutchCoder TheDutchCoder added the bug Something isn't working label Jan 7, 2021
@znck
Copy link
Collaborator

znck commented Jan 8, 2021

Blocked on vuejs/core#2947

@znck znck added the blocked Blocked on some dependency label Jan 8, 2021
@EricRabil
Copy link

Here's a d.ts merge until it is resolved upstream.

declare global {
  namespace React {
    interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
      class?: unknown;
    }
  }
}

@znck znck added the Stale label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on some dependency bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants