-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.24.7
Current Behavior
When strictly typing toErrorSchema
inputs as RJSFValidationError[]
, the docs example is invalid because a RJSFValidationError
must also specify the stack
property. The list of alleged example RJSFValidationError
s in the docs specifies only the property
and message
properties, missing the stack
.
Expected Behavior
No error when strongly typing docs examples.
Steps To Reproduce
- Take the docs example and strictly type it.
- Notice this:
- Giving this error:
Environment
Irrelevant
Anything else?
Maybe a new type should be introduced for custom user errors. Even a simple Partial<RJSFValidationError>
would
superficially resolve the error. I am unsure if anything further down would break by doing this, though.
This issue was discovered while trying to get around #4553, which I did.