Accumulator contract, shared by every function in this module: nothing is returned and
nothing throws — findings are pushed intoerrors and warnings, so one traversal can
collect every defect of a profile instead of stopping at the first. A caller decides the
profile is invalid by testing errors.length, not by catching.
A non-array rules is itself an error; each entry is then checked for a when and a
style.
Parameters
rules: unknown
The candidate styleRules value, of unverified shape.
Validates a layer's whole
styleRulesarray.Accumulator contract, shared by every function in this module: nothing is returned and nothing throws — findings are pushed into
errorsandwarnings, so one traversal can collect every defect of a profile instead of stopping at the first. A caller decides the profile is invalid by testingerrors.length, not by catching.A non-array
rulesis itself an error; each entry is then checked for awhenand astyle.