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

feat(runtime-core): add skipCheck for prop #7548

Merged
merged 2 commits into from
Mar 28, 2023
Merged

Conversation

sxzz
Copy link
Member

@sxzz sxzz commented Jan 17, 2023

closes #7511

@netlify
Copy link

netlify bot commented Jan 17, 2023

Deploy Preview for vuejs-coverage failed.

Name Link
🔨 Latest commit 182c253
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/63d2b509a28d800009935354

@sxzz sxzz marked this pull request as draft January 17, 2023 07:25
@sxzz sxzz changed the title fix(compiler-sfc): runtime props type when cannot infer fix(runtime-core): skip prop type check when null included Jan 17, 2023
@sxzz sxzz marked this pull request as ready for review January 17, 2023 12:18
@sxzz sxzz force-pushed the fix/infer-runtime-null branch 2 times, most recently from 182c253 to 9836cc8 Compare February 1, 2023 15:17
@sxzz sxzz force-pushed the fix/infer-runtime-null branch 2 times, most recently from 8eddc69 to d4f70d5 Compare March 28, 2023 05:20
@yyx990803
Copy link
Member

yyx990803 commented Mar 28, 2023

This is still a compiler issue - union / intersection types containing unknown types were not handled correctly. In the case of #7511 it should have generated null due to the type of the Enum not inferable (which we technically can fix, but is a separate issue).

see 5fb406e

@yyx990803 yyx990803 closed this Mar 28, 2023
@sxzz
Copy link
Member Author

sxzz commented Mar 28, 2023

@yyx990803 But we introduced a breaking change now.

Demo

- undefined for Vue 3.3
false - boolean for Vue 3.2


I think it's too fragile now. If resolving TS failed and it'll lose all types so that we cannot figure Boolean and Function out.

@sxzz sxzz deleted the fix/infer-runtime-null branch March 28, 2023 13:11
@sxzz sxzz restored the fix/infer-runtime-null branch March 28, 2023 13:13
@sxzz sxzz reopened this Mar 28, 2023
@sxzz sxzz marked this pull request as draft March 28, 2023 13:14
@sxzz sxzz changed the title fix(runtime-core): skip prop type check when null included feat(runtime-core): add skipCheck for prop Mar 28, 2023
@sxzz sxzz marked this pull request as ready for review March 28, 2023 13:47
@yyx990803 yyx990803 merged commit 63ad77f into main Mar 28, 2023
@yyx990803 yyx990803 deleted the fix/infer-runtime-null branch March 28, 2023 14:29
IAmSSH pushed a commit to IAmSSH/core that referenced this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEV Warning: type check failed for enum prop
2 participants