import { Pipe , PipeTransform } from '@angular/core' ; import * as L from 'leaflet' ; import { ShakeAlertOverlay } from './map-overlay/shake-alert-overlay' ; @ Pipe ( { name : 'shakeAlertOverlays' } ) export class ShakeAlertOverlaysPipe implements PipeTransform { param alert transform ( alert ) { if ( ! alert ) { return null ; } const overlays = [ ] ; if ( alert && alert . features ) { overlays . push ( new ShakeAlertOverlay ( alert ) ) ; } return overlays ; } }