-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Make the warning messages more explicit #7764
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
Comments
Can I take up this issue |
Of course! |
@posuva Since this is first contribution, Can you tell me where to start-off |
@ajomadlabs I'd suggest searching the string for the file and go from there. In this case |
@posva Should I replace the 'value' with the actual value that it encountered ? Correct me if I am wrong |
@ajomadlabs the goal here is to allow the dev to see which value generated that error. I'm guessing the string could be something like: warn(
`Invalid prop: type check failed for prop "${name}".` +
` Expected ${expectedTypes.map(capitalize).join(', ')}` +
`, got ${toRawType(value)} with value ${givenValue}.`,
vm
) ...to be defined to be consistent with other Vue messages. Also, be sure to display the 'type' of the value by adding quotes if it's a string like |
@AlexandreBonneau Thanks 👍 |
Since nothing has happened for 12 days I was wondering if I could taker over this one as my first contribution? 😊 |
@dczombera I am working on it but I am getting stuck in the middle |
Do you need any particular help for getting unstuck @ajomadlabs ? |
@AlexandreBonneau I think I have found it |
👍 |
Is this issue up for grab? seems like its been a while since any progress has been made. |
Alright, @yuriyalekseyev :) |
Folks any update on this PR? Would love to have it merged. |
What problem does this feature solve?
When seeing warning message like
[Vue warn]: Invalid prop: type check failed for prop "value". Expected Number, got String.
, it would be great if Vue could display the actual values it encountered.For instance, immediately seeing
2
and'2'
would speed up development.What does the proposed API look like?
No API changes
The text was updated successfully, but these errors were encountered: