the editable site (validation-lab)

This commit is contained in:
kpgarrod committed 2026-11-21 08:03:55 +01:00
commit 3ac81d5a52
13454 files changed
+2227005

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { Validation } from "../common";
import { FeatureId, IdStrategy } from "./store";
export declare const StoreValidationErrors: {
readonly FeatureHasNoId: "Feature has no id";
readonly FeatureIsNotObject: "Feature is not object";
readonly InvalidTrackedProperties: "updatedAt and createdAt are not valid timestamps";
readonly FeatureHasNoMode: "Feature does not have a set mode";
readonly FeatureIdIsNotValidGeoJSON: "Feature must be string or number as per GeoJSON spec";
readonly FeatureIdIsNotValid: "Feature must match the id strategy (default is UUID4)";
readonly FeatureHasNoGeometry: "Feature has no geometry";
readonly FeatureHasNoProperties: "Feature has no properties";
readonly FeatureGeometryNotSupported: "Feature is not Point, LineString or Polygon";
readonly FeatureCoordinatesNotAnArray: "Feature coordinates is not an array";
readonly InvalidModeProperty: "Feature does not have a valid mode property";
};
export declare function hasModeProperty(feature: unknown): feature is {
properties: {
mode: string;
};
};
export declare function isValidTimestamp(timestamp: unknown): boolean;
export declare function isValidStoreFeature(feature: unknown, isValidId: IdStrategy<FeatureId>["isValidId"]): ReturnType<Validation>;