Type Alias: ValidateResult
ts
type ValidateResult =
| {
doc: DocJSON;
ok: true;
removed: Issue[];
}
| {
errors: Issue[];
ok: false;
};Result of validate(): the clean document, or why it was rejected.
Union Members
Type Literal
ts
{
doc: DocJSON;
ok: true;
removed: Issue[];
}doc
ts
doc: DocJSON;The rebuilt document, migrated to the current schemaVersion.
ok
ts
ok: true;The document is accepted.
removed
ts
removed: Issue[];What was stripped from the input. Always empty in 'strict' mode.
Type Literal
ts
{
errors: Issue[];
ok: false;
}errors
ts
errors: Issue[];Why it was rejected.
ok
ts
ok: false;The document is rejected.