Skip to content

types(reactivity): optimize the display type of ref #12005

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yangliguo7
Copy link
Contributor

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

npm i https://pkg.pr.new/@vue/compiler-core@12005

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@12005

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@12005

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@12005

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@12005

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@12005

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@12005

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@12005

@vue/shared

npm i https://pkg.pr.new/@vue/shared@12005

vue

npm i https://pkg.pr.new/vue@12005

@vue/compat

npm i https://pkg.pr.new/@vue/compat@12005

commit: dafd7dd

Copy link

github-actions bot commented Sep 23, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38.1 kB 34.3 kB
vue.global.prod.js 158 kB 58 kB 51.6 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB 18.2 kB 16.7 kB
createApp 54.5 kB 21.3 kB 19.5 kB
createSSRApp 58.7 kB 23 kB 21 kB
defineCustomElement 59.4 kB 22.9 kB 20.8 kB
overall 68.6 kB 26.4 kB 24 kB

@yangliguo7
Copy link
Contributor 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?

@xak2000
Copy link

xak2000 commented Mar 17, 2025

Also: is it really necessary to export the intermediate type? Would it work without an export?

All exported types become a part of public API, so the less exported types - the better.

@edison1105
Copy link
Member

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Mar 19, 2025

📝 Ran ecosystem CI: Open

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

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
4 participants