Client
Server
Reference / @open-music-sdk/validate / tResult
type tResult<T> =
| {
issues?: undefined;
value: T;
}
| {
issues: readonly tIssue[];
};Defined in: runtime.ts:14
What validating a value comes to: the value, now typed, or everything wrong with it.
T
{
issues?: undefined;
value: T;
}readonly optional issues?: undefined;Never set when the value passed: if (result.issues) tells the two apart.
readonly value: T;The value as it was given, now known to be a T.
{
issues: readonly tIssue[];
}readonly issues: readonly tIssue[];Everything wrong with the value, in the order it was found.