import { Map } from "leaflet" ; import { compileExpression , FilterFunc } from "facilmap-utils" ; declare module "leaflet" { interface Map { fmFilter : string | undefined ; fmFilterFunc : FilterFunc ; setFmFilter ( filter ? ) : void ; } } Object . assign ( Map . prototype , { fmFilter : undefined , fmFilterFunc : compileExpression ( ) , setFmFilter ( this , filter ? ) { this . fmFilterFunc = compileExpression ( filter ) ; this . fmFilter = filter || undefined ; this . fire ( "fmFilter" ) ; } } ) ;