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

types(watch): support single usage of defineModel with watch #9940

Closed
wants to merge 1 commit into from

Conversation

pikax
Copy link
Member

@pikax pikax commented Dec 29, 2023

closes #9939

Because ModelRef is also an array it falls through the array sources, even tho it shouldn't be handled as an array in this case

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.3 kB 34 kB 30.6 kB
vue.global.prod.js 146 kB 53.2 kB 47.6 kB

Usages

Name Size Gzip Brotli
createApp 49.7 kB 19.5 kB 17.8 kB
createSSRApp 53 kB 20.8 kB 19 kB
defineCustomElement 52 kB 20.2 kB 18.4 kB
overall 63.2 kB 24.4 kB 22.2 kB

@pikax pikax added scope: types 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Dec 29, 2023
@Alfred-Skyblue
Copy link
Member

Sorry, I didn't find that you have created this PR. I found in #9942 that adjusting the order of overloads can solve this problem, which can reduce unnecessary overloads. Of course, I don't know if my solution in #9942 is reasonable. If you think it is better to add an overload, I can turn close #9942.

@yyx990803
Copy link
Member

I think #9942 is simpler than adding a dedicated overload.

@yyx990803 yyx990803 closed this Dec 30, 2023
@pikax pikax deleted the pikax/types_defineModel_watch branch December 30, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModelRef as watch source wrong type
3 participants