import Reattempt , { ReattemptOptions } from '..' ; export default function ReattemptDecorator ( options ) { return function withReattempt ( target , propertyKey , descriptor ) : any { const fn = descriptor . value ; descriptor . value = function ( ) { const args = arguments ; return Reattempt . run ( options , ( ) => fn . apply ( this , args ) ) ; } ; } ; }