Validates the label block of a style, in either of its two accepted forms.
label may be a string — the feature property to display, which needs no further
checking — or a configuration object, whose colour, opacity, buffer, background and
offset are then validated. An absent label is not a defect. Anything else (a number, an
array) is an error.
Accumulator contract: findings are pushed into errors and warnings, nothing is returned.
Parameters
styleData: Record<string,unknown>
The style object to inspect; a missing label returns immediately.
Validates the
labelblock of a style, in either of its two accepted forms.labelmay be a string — the feature property to display, which needs no further checking — or a configuration object, whose colour, opacity, buffer, background and offset are then validated. An absentlabelis not a defect. Anything else (a number, an array) is an error.Accumulator contract: findings are pushed into
errorsandwarnings, nothing is returned.