Subscribe on changes!

V3.2.34 ignore AllowedComponentProps in TSX

avatar
May 20th 2022

Link to minimal reproduction

https://github.com/shenron/vite-demo/tree/tsx-issue

Steps to reproduce

npm ci npm run lint:tsc

What is expected?

Same as previous version. "class" and "style" attribute should be allowed.

What is actually happening?

"class" and "style" attributes needs to be declared as prop in the component, else I have this error:

 error TS2322: Type '{ class: string; }' is not assignable to type 'IntrinsicAttributes & Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>>, never>'.
  Property 'class' does not exist on type 'IntrinsicAttributes & Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>>, never>'.

12   <MyButton class="a-super-class" />
               ~~~~~

System Info

System:
    OS: Linux 5.15 Arch Linux
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 19.80 GB / 31.33 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  Browsers:
    Chromium: 101.0.4951.64
  npmPackages:
    vue: 3.2.34 => 3.2.34

Any additional comments?

I have two components. It's broken only If I use an already built component.

image