function startPrintTimeout(params) {
  console.log('Start print timeout');
  setTimeout(function () {
    isPrinting = false;
  }, noPrintTimeoutSecs ? (noPrintTimeoutSecs * 1000) : 0);

  isPrinting = true;

  // Just passes through a resolved promise
  // with the same arguments
  return Promise.resolve(params);
}
/*
  Sets the global variable `isPrinting`
  to true and after waiting `printTimeoutSecs`
  seconds, sets it to false again
*/
Sets the global variable `isPrinting`
to true and after waiting `printTimeoutSecs`
seconds, sets it to false again
Sets the global variable ` isPrinting ` to true and after waiting ` printTimeoutSecs ` seconds sets it to false again
function startPrintTimeout(params) {
  console.log('Start print timeout');
  setTimeout(function () {
    isPrinting = false;
  }, noPrintTimeoutSecs ? (noPrintTimeoutSecs * 1000) : 0);
  isPrinting = true;
  return Promise.resolve(params);
}
function startPrintTimeout ( params ) { console . log ( 'Start print timeout' ) ; setTimeout ( function ( ) { isPrinting = false ; } , noPrintTimeoutSecs ? ( noPrintTimeoutSecs * 1000 ) : 0 ) ; isPrinting = true ; return Promise . resolve ( params ) ; }
Sets the global variable `isPrinting`
to true and after waiting `printTimeoutSecs`
seconds, sets it to false again
Sets the global variable ` isPrinting ` to true and after waiting ` printTimeoutSecs ` seconds sets it to false again
// Just passes through a resolved promise // with the same arguments