types(reactivity): optimize the display type of ref
fix #11969
optimize the ref type to better display types in its ide
@yangliguo7 Could you please add a test case for this?
@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
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 |
@edison1105 ok. i'll see to it
by the way. Is this change too simple to require adding tests?
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?
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.
/ecosystem-ci run
📝 Ran ecosystem CI: Open
| suite | result | latest scheduled |
|---|---|---|
| language-tools | :x: failure | :white_check_mark: success |
| pinia | :x: failure | :white_check_mark: success |
| nuxt | :x: failure | :white_check_mark: success |
| quasar | :white_check_mark: success | :white_check_mark: success |
| primevue | :x: failure | :white_check_mark: success |
| test-utils | :white_check_mark: success | :white_check_mark: success |
| vant | :white_check_mark: success | :white_check_mark: success |
| radix-vue | :white_check_mark: success | :white_check_mark: success |
| vite-plugin-vue | :white_check_mark: success | :white_check_mark: success |
| vitepress | :white_check_mark: success | :white_check_mark: success |
| vue-simple-compiler | :white_check_mark: success | :white_check_mark: success |
| router | :white_check_mark: success | :white_check_mark: success |
| vueuse | :white_check_mark: success | :white_check_mark: success |
| vuetify | :white_check_mark: success | :white_check_mark: success |
| vue-macros | :white_check_mark: success | :white_check_mark: success |
| vue-i18n | :white_check_mark: success | :white_check_mark: success |