import { Pipe , PipeTransform } from '@angular/core' ; import { Event } from '../event' ; @ Pipe ( { name : 'getProduct' } ) export class GetProductPipe implements PipeTransform { param event param type param source param code param updateTime return { any } transform ( event , type , source ? , code ? , updateTime ? ) { if ( ! event ) { return null ; } return event . getProduct ( type , source , code , updateTime ) ; } }