Open
Description
When I read the generated code it often repeats strings like "validation failed at "
, ": there are no valid alternatives"
, ": expected an object"
and many more. Putting those to const variables and then using only those consts instead should help to reduce the size. Or maybe better to create error message builder functions like this:
function expectedProperty(path, property) {
return `validation failed at ${path.join(".")}: expected '${property}' in object`;
}
Minifiers will also minify function and variable names.
Metadata
Metadata
Assignees
Labels
No labels