import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate } from './types' ; import addHours from 'date-fns/addHours' ; @ Pipe ( { name : 'dfnsAddHours' } ) export class AddHoursPipe implements PipeTransform { transform ( date , amount ) { return addHours ( date , amount ) ; } } @ NgModule ( { declarations : [ AddHoursPipe ] , exports : [ AddHoursPipe ] } ) export class AddHoursPipeModule { }