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(reactivity): optimize the display type of ref #12005

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yangliguo7
Copy link

fix #11969

optimize the ref type to better display types in its ide

@edison1105 edison1105 added need test The PR has missing test cases. scope: types labels Sep 23, 2024
@edison1105
Copy link
Member

@yangliguo7 Could you please add a test case for this?

Copy link

pkg-pr-new bot commented Sep 23, 2024

Open in Stackblitz

@vue/compiler-core

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

@vue/compiler-sfc

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

@vue/compiler-dom

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/shared

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

@vue/server-renderer

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

vue

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

@vue/compat

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

commit: 1ae2275

Copy link

Size Report

Bundles

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

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49 kB 18.9 kB 17.2 kB
createApp 55.6 kB 21.4 kB 19.6 kB
createSSRApp 59.6 kB 23.1 kB 21 kB
defineCustomElement 60.4 kB 22.9 kB 20.9 kB
overall 69.3 kB 26.5 kB 24 kB

@yangliguo7
Copy link
Author

@edison1105 ok. i'll see to it

by the way. Is this change too simple to require adding tests?

@edison1105 edison1105 changed the title perf(ref): optimize the display type of ref types(reactivity): optimize the display type of ref Sep 23, 2024
@edison1105 edison1105 added ready to merge The PR is ready to be merged. and removed need test The PR has missing test cases. labels Sep 23, 2024
@xak2000
Copy link

xak2000 commented Sep 29, 2024

Wouldn't TypedRef better than TypeRef considering the reason of this type to exist? I see it is exported, so, the name becomes part of the public API, 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.

Improve type hints that were worsened by adding a second type argument to the Ref type
3 participants