assertValidDefinitions
Validates a set of definitions, including that their ids are unique, and returns it unchanged. A host calls this once when it builds its catalogue.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { assertValidDefinitions } from "@mapcairn/core";
function assertValidDefinitions<T extends readonly LayerDefinition[]>(definitions: T, options: ValidationOptions): T;
Type parameters
T(readonly LayerDefinition[])
Parameters
definitions(T)options(ValidationOptions)
Returns
T
Throws
- An error listing every problem, each prefixed with its layer id.