import { Filter , FilterMeta , LatLon } from './meta_filter' ; export type GeoPolygonFilterMeta = FilterMeta & { params : { points : LatLon [ ] ; } ; } ; export type GeoPolygonFilter = Filter & { meta : GeoPolygonFilterMeta ; geo_polygon : any ; } ; export const isGeoPolygonFilter = ( filter ) : filter is GeoPolygonFilter => filter && filter . geo_polygon ; export const getGeoPolygonFilterField = ( filter ) => { return ( filter . geo_polygon && Object . keys ( filter . geo_polygon ) . find ( ( key ) => key !== 'ignore_unmapped' ) ) ; } ;