import type { YMap, YMapEntity } from '@yandex/ymaps3-types'; import type { LngLat, WorldCoordinates, GenericPointFeature } from '@yandex/ymaps3-types/common/types'; /** Represents object on a map (either cluster or feature) */ type ClustererObject = { world: WorldCoordinates; lnglat: LngLat; clusterId: string; features: Feature[]; }; /** Feature to clusterize on a map */ type Feature = GenericPointFeature; /** Cluster that contains cluster or feature and its sum of coordinates */ type Cluster = { sumX: number; sumY: number; objects: ClustererObject[]; features: Feature[]; }; type ClustersCollection = Map; /** Props for rendering */ type RenderProps = { map: YMap; features: Feature[]; }; /** Represents map of entities with its id */ type EntitiesMap = Record | undefined>; /** Interface of method class*/ interface IClusterMethod { render(props: RenderProps): ClustererObject[]; } export type { EntitiesMap, ClustersCollection, ClustererObject, Feature, IClusterMethod, RenderProps };