import { ReSubstitute } from '@fdmg/resubstitute' ; import { Header } from '../utils/FdEvents' ; class HeadersStore extends ReSubstitute { private headers : Header [ ] = [ ] ; addHeader ( header ) { const headers = this . headers . concat ( header ) ; this . headers = headers ; this . trigger ( ) ; } setHeaders ( headers ) { this . headers = headers || [ ] ; this . trigger ( ) ; } clear ( ) { this . headers = [ ] ; this . trigger ( ) ; } getHeaders ( ) { return this . headers ; } } export = new HeadersStore ( ) ;