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

[Bug Report][3.1.15] VSelect prop return-object type error #17211

Closed
kingyue737 opened this issue Apr 23, 2023 · 7 comments
Closed

[Bug Report][3.1.15] VSelect prop return-object type error #17211

kingyue737 opened this issue Apr 23, 2023 · 7 comments
Assignees
Labels
has workaround T: bug Functionality that does not work as intended/expected typescript

Comments

@kingyue737
Copy link
Contributor

Environment

Vuetify Version: 3.1.15
Vue Version: 3.2.47
Browsers: Edge 112.0.1722.48
OS: Windows 10

Steps to reproduce

Add a <v-select> with prop return-object in template. Type error:

Type 'true' is not assignable to type 'false'.

image

Expected Behavior

return-object can be either true or false

Actual Behavior

return-object can only accept false

Reproduction Link

https://play.vuetifyjs.com/#...

@KaelWD
Copy link
Member

KaelWD commented Apr 23, 2023

@kingyue737 what versions of typescript, volar, and vue-tsc do you have?

@kingyue737
Copy link
Contributor Author

typescript v5.0.4, volar v1.4.3
I found the error disappeared if I downgrade to v1.2.1. Maybe a bug of volar

@yuwu9145
Copy link
Member

yuwu9145 commented Apr 24, 2023

In my opinion, it was an enhancement in volar recent version(1.3.9) that makes this issue appear. And we should resolve it from vuetify side.

Though I am still unsure what was the exact change/enhancement push it to show up

@sgarcia-freightwaves
Copy link

In my team we are having this same issue but with the github actions, we can't deploy because the build is failing:

image

@ggedde
Copy link

ggedde commented Apr 24, 2023

Same issue here, but on v-select with "multiple" prop.

Type 'true' is not assignable to type 'false'.ts(2322)
index.d.ts(43840, 9): The expected type comes from property 'multiple' which is declared here on type 'Partial<{ reverse: boolean; type: string; error: boolean; active: boolean; direction: "vertical" | "horizontal"; transition: NonNullable<string | boolean | (TransitionProps & { ...; })> | { ...; }; ... 30 more ...; openOnClear: boolean; }> & ... 4 more ... & Record<...>'
(property) multiple?: false | undefined

Everything is working on dev, but It is preventing me from running build

@jcchrrr
Copy link

jcchrrr commented Apr 25, 2023

cf #17212

@Ge6ben
Copy link

Ge6ben commented May 10, 2023

In my case I fixed it by this way!

<v-select
    v-model="select"
    :items="items"
     v-bind="{'return-object':true}"
  />
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround T: bug Functionality that does not work as intended/expected typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants