We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/** * @psalm-template T * @psalm-param mixed $value * @psalm-param Context $context * @psalm-param string|null $message * @psalm-return ValidationFailures<T> * * @param mixed $value */ public static function failure($value, Context $context, ?string $message = null): self { return self::failures( [new VError($value, $context, $message)] ); }
This constructor will never infer correctly Validation<T>.
Validation<T>
The text was updated successfully, but these errors were encountered:
Wouldn't it be technically a ValidationFailure<never>? As a bottom type it should match with everything... Or not?
ValidationFailure<never>
Sorry, something went wrong.
Something like that @Jean85.
I think I've introduced a design error attempting to carrying on information about the decoder target type also in case of error.
In io-ts, the decode function gives an Either<Errors, T>. ValidationFailure<T> is not isomorphic with Left<Errors>.
Either<Errors, T>
ValidationFailure<T>
Left<Errors>
Successfully merging a pull request may close this issue.
This constructor will never infer correctly
Validation<T>
.The text was updated successfully, but these errors were encountered: