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(runtime-core): type ExposedKeys removed defined properties on com… #12697

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

Conversation

akotulu
Copy link

@akotulu akotulu commented Jan 13, 2025

Fixes typo made in pull request #3399.

IDEs using Vue language service with TypeScript support will have all the local component variables displayed as red with an error Vue: X does not exist on type. ExposedKeys will compare empty string ('') to extend Exposed type which will always fail cause builtin string can't extend custom class.

Tested with:
PHPStrom 2024.3.1.1
TypeScript 5.7.3
Vue LS 2.2.0

@jh-leong
Copy link
Member

This change will break the existing test case in packages-private/dts-test/defineComponent.test-d.tsx. You can verify this by running pnpm run test-dts.

By the way, could you provide a test case or a minimal reproduction to clarify the issue this PR is addressing? Thanks!

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38 kB 34.2 kB
vue.global.prod.js 158 kB 57.8 kB 51.4 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.4 kB 18.2 kB 16.6 kB
createApp 54.3 kB 21.2 kB 19.3 kB
createSSRApp 58.5 kB 22.9 kB 20.9 kB
defineCustomElement 59.2 kB 22.8 kB 20.7 kB
overall 68.4 kB 26.3 kB 24 kB

Copy link

pkg-pr-new bot commented Jan 13, 2025

Open in Stackblitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/compiler-sfc

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 980cd03

@edison1105 edison1105 added the need more info Further information is requested label Jan 14, 2025
@DC240
Copy link

DC240 commented Jan 14, 2025

This change will break the existing test case in packages-private/dts-test/defineComponent.test-d.tsx. You can verify this by running pnpm run test-dts.

By the way, could you provide a test case or a minimal reproduction to clarify the issue this PR is addressing? Thanks!

I can confirm this issue using Webstorm LTS 2024.2.5 Build #WS-242.24807.6
I created a reproduction repo: https://github.com/DC240/12697-runtime-core-error-reproduction

Screenshot 2025-01-14 at 10 40 52

It is however, only the case if I'm using class based components using vue-facing-decorator. Using the composition API, the component resolves correctly. We have a lot of older projects at our company for which there is no budget to convert them to composition API, so for us it is a pretty common and annoying problem.

Screenshot 2025-01-14 at 10 46 03

@akotulu
Copy link
Author

akotulu commented Jan 14, 2025

It took whole weekend to figure out where this issue with Intellij ideas came from. I will look at the tests when I have time again. Probably end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants