-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Setup script generic type problem #11394
Comments
/cc @so1ve |
|
Ok, I see the problem. I tried to write it differently in TS: Then I tried it in my IDE and it works for the component itself so when I pass |
Vue version
3.4.32
Link to minimal reproduction
https://play.vuejs.org/#eNqdVE1v2zAM/SusL3aBxsawnTK7RbcGWId+BG3Qy7yDazOpOlk2JDlNkeW/j5Js10mDFuvFsMhH6vGR1No7retw2aA39mKVS1ZrUKib+jgVrKwrqWENEuewgbmsSvAJ6veuc1E3unWEkT2ZXP7XQbC1zp5r7FOEkaajMqhU5JVQGpYZbxASc1Pw6ZAcceTIEA06aCxrnmmkE0B8MBqBSdjRfagaXsAzcg76IdMgmvIeJTAFotKQKcUWIrvnCLoCpSUTC/hLIIKPRi6jq2M5KqsCeZJ6lk7qwdgQpXNfQ3hr48kVUWQcDYh5R55WVM2cLcJHVQkSdG2Sp15elTXjKK9rzaja1BuD9Rhfxnn19NPatGzwqLPnD5j/2WN/VCtjS72pRIVySSx7n87kArVzT26vcEX/vZNKazih33DeoKp4Yzg62LdGFER7gLNsz21nSYWZmqw0CtUVZYga5MbiScUGv79R+gvdz+EXG5eKDanYj9HuSALPxIK6oSkPLFCgZDkdZ0DFoCjUy6gdwR0N0x5HeOVm46QbknYQxnvBrtkE3p6aMQhcGl2GO2Ka3GgsthblP/YgimB6cz29pQihUc6zHGEqq1o5wQySSBKUVOq2prb+BAqcM4EWHdvvcWB2yCa9vD6bXFBWF2EH/K5dNhd2aUzx3SDk7HR22gVgwbTZnS6mKzP+Mbu8sCVNOJYo9C/fLo3/+ziwhKm1wWHXbEntk2Jwe+gW/iBJnKQn4LQOdiGHpLZvFOrGiiYhEPhkIX1+NofAihEanSChtLst77EAVOJAh/b5uMftkejArzgT4/Z6S592xMpYUA3upgE9mhRKZdkTf0Cu8H0aW8P2ERq9Y/v6TsPNe+9rwZb2h37ZzsO4NQ7tK0iwyIW8eg/NeIda0SLjyq4BksaDTbBatCuZgO8a4Ns+t7tHVqeHsVIJ3uYflE9Dxw==
Steps to reproduce
enum Type {
Number = 'number',
String = 'string',
}
generic="T extends Type, V = T extends Type.Number ? number | null : T extends Type.String ? string | null : never">
What is expected?
V should be generic based on the given T
What is actually happening?
V is never resolved inside vue component nor when using the component
System Info
Any additional comments?
When defining model as
const modelValue = defineModel<T extends Type.Number ? number | null : T extends Type.String ? string | null : never>();
than when using the component, type is calculated from the generic T.
The text was updated successfully, but these errors were encountered: