Skip to content

GeoJSONSchema

const GeoJSONSchema: z.ZodTypeAny

Defined in: packages/core/src/schemas/geojson.schema.ts:242

Top-level GeoJSON accepted as inline source.data: a FeatureCollection, a bare Feature, or any bare geometry.

A single discriminatedUnion("type", …) across every top-level type literal — one branch per node, the R11 mitigation. Inline source data is usually a FeatureCollection, but a bare geometry or Feature is also legal GeoJSON that MapLibre accepts. Annotated z.ZodTypeAny for the same TS7056 reason as GeometrySchema.