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