Fixing typescript

This commit is contained in:
Drew Heavner
2019-11-08 09:40:34 -05:00
parent 413298b06f
commit 3b9b1768ea
7365 changed files with 1663644 additions and 16 deletions
+12
View File
@@ -0,0 +1,12 @@
'use strict'
/**
* Tries to execute a function and discards any error that occurs.
* @param {Function} fn - Function that might or might not throw an error.
* @returns {?*} Return-value of the function when no error occurred.
*/
module.exports = function(fn) {
try { return fn() } catch (e) {}
}