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