import { formatError } from './format-error' ; import { maskAndLogError } from './mask-and-log-error' ; export param { ( err : any ) => any } formatFunction returns { ( target , methodName , descriptor ) => any } export function FormatError ( formatFunction = maskAndLogError ) { return ( target , methodName , descriptor ) => { descriptor . value = formatError ( descriptor . value , formatFunction ) ; return descriptor ; } ; }