We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.4.21
play.vuejs.org
withDefaults( defineProps< { def: string } & ( | { type: 'hello' results: string } | { type: 'world' results: number } ) >(), { def: 'default value!', } )
Expected type from this would be:
type ExpectedType = { readonly def: string; readonly type: 'hello'; readonly results: string; } | { readonly def: string; readonly type: 'world'; readonly results: number; }
type actualType = { readonly type: "hello" | "world"; readonly results: string | number; readonly def: string; }
No response
The problem is with Typescripts utility type Omit. See: microsoft/TypeScript#54451 and microsoft/TypeScript#53169
The text was updated successfully, but these errors were encountered:
37ba93c
Same as #9336 right? Seems like this one was first
Sorry, something went wrong.
fix(types): avoid merging object union types when using withDefaults (v…
74f458c
…uejs#10596) close vuejs#10594
No branches or pull requests
Vue version
3.4.21
Link to minimal reproduction
play.vuejs.org
Steps to reproduce
What is expected?
Expected type from this would be:
What is actually happening?
System Info
No response
Any additional comments?
The problem is with Typescripts utility type Omit. See: microsoft/TypeScript#54451 and microsoft/TypeScript#53169
The text was updated successfully, but these errors were encountered: