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(core): Add warning message if prop type=null and value=null #12571

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

Conversation

jamesnakagawa
Copy link

Description

Adds a warning when the prop's type=null and the value is also null or undefined.

Motivation

defineProps will generate type=null if the static type cannot be compiled into a basic type. However, this also means null values will be allowed even though the prop is required.

See a live demo of the bug here

Motivation: defineProps will generate type=null if the static type
cannot be inferred into a basic type. However, this also disables
required checking.

Adds a warning when the prop's type=null and the value is also null.
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.

1 participant