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

fix(types): retain union type narrowing with defaults applied #12108

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

edison1105
Copy link
Member

close #12106

Copy link

github-actions bot commented Oct 4, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB 38.1 kB 34.2 kB
vue.global.prod.js 160 kB 58 kB 51.5 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49.1 kB 18.9 kB 17.3 kB
createApp 55.7 kB 21.4 kB 19.6 kB
createSSRApp 59.7 kB 23.1 kB 21 kB
defineCustomElement 60.4 kB 23 kB 20.9 kB
overall 69.4 kB 26.5 kB 24.1 kB

Copy link

pkg-pr-new bot commented Oct 4, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12108

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12108

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12108

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12108

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12108

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12108

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12108

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12108

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12108

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12108

vue

pnpm add https://pkg.pr.new/vue@12108

commit: e88722a

@edison1105 edison1105 changed the title fix(types): retain union type narrowing in PropsWithDefaults with defaults applied fix(types): retain union type narrowing with defaults applied Oct 4, 2024
@edison1105 edison1105 added the ready to merge The PR is ready to be merged. label Oct 4, 2024
@darkbasic
Copy link

Could you please check if it somehow helps with #12110
Thanks

@edison1105
Copy link
Member Author

Could you please check if it somehow helps with #12110 Thanks

I think it is related to language-tool

@darkbasic
Copy link

I'd like to cherry-pick both this and #12059 but I get conflicts with https://github.com/vuejs/core/pull/12059/files#diff-ddb3174016350dd4464764b4a1ba232d09ad1e75164d4a37758c759d019202e4

How would you solve it in the context of the other PR?

@yyx990803
Copy link
Member

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Oct 11, 2024

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt success success
pinia success success
primevue success success
quasar success success
radix-vue success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success success
vue-i18n success success
vue-macros success success
vuetify success success
vueuse success success
vue-simple-compiler success success

@yyx990803 yyx990803 merged commit 73f626c into main Oct 11, 2024
15 checks passed
@yyx990803 yyx990803 deleted the edison/fix/12106 branch October 11, 2024 03:17
@yyx990803
Copy link
Member

I mistyped the issue number when merging 😓
Amended commit 05685a9

@darkbasic
Copy link

I guess that #12059 needs to be rebased on top of this to fix the remaining issue, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR is ready to be merged. scope: types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discriminated Union will not work if default value is specified
5 participants