-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Wrong props parser with generics #9871
Comments
relate PR https://github.com/vuejs/core/pull/8511/files Here the generic parameters are overridden, causing parsing to fail core/packages/compiler-sfc/src/script/resolveType.ts Lines 298 to 302 in 9fa8241
|
Never mind! The problem should have been fixed by 03aa0d4. But it's weird, the problem still happens on the local playground. |
@edison1105 it requires a change in |
Vue version
3.3.13
Link to minimal reproduction
https://github.com/tragid/vue-generics-error
Steps to reproduce
Create 2 components, whose props extend IFormTextInput (first component) and IFormCheckboxInput (second component)
Render that components in app with provided generic prop (value in example)
What is expected?
Components are rendered without errors
What is actually happening?
Components are rendered with errors.
Sometimes first component (textInput) renders wrong default value (passed empty string - but renders true). Console says it has boolean true as input prop.
Sometimes first component renders correctly, but second component (checkbox) renders with warnings, saying Boolean is passed as prop, but String is expected (but generic is boolean)
System Info
Any additional comments?
Version 3.3.9 works as expected
The text was updated successfully, but these errors were encountered: