param delay export function Debounce ( delay = 100 ) { return function ( target , propertyKey , descriptor ) { let timer = null ; const original = descriptor . value ; descriptor . value = function ( ... args ) { if ( timer ) { clearTimeout ( timer ) ; } timer = setTimeout ( ( ) => { original . apply ( this , args ) ; timer = null ; } , delay ) ; } ; return descriptor ; } ; }