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

V3.2.34 ignore AllowedComponentProps in TSX #5967

Closed
tcastelly opened this issue May 20, 2022 · 0 comments
Closed

V3.2.34 ignore AllowedComponentProps in TSX #5967

tcastelly opened this issue May 20, 2022 · 0 comments

Comments

@tcastelly
Copy link

tcastelly commented May 20, 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

yyx990803 added a commit that referenced this issue May 20, 2022
This is necessary for compatibility w/ tsc-generated component types
using DefineComponent.

revert #5416
reopen #3796
fix #5967
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants