Convert browser and generic to TS

Part of #335
This commit is contained in:
Daniel Imms
2016-12-31 07:36:56 -08:00
parent 1fbd3c8f65
commit 3e1a607179
3 changed files with 23 additions and 23 deletions
+14
View File
@@ -0,0 +1,14 @@
/**
* Generic utilities module with methods that can be helpful at different parts of the code base.
* @module xterm/utils/Generic
* @license MIT
*/
/**
* Return if the given array contains the given element
* @param {Array} array The array to search for the given element.
* @param {Object} el The element to look for into the array
*/
export function contains(arr: any[], el: any) {
return arr.indexOf(el) >= 0;
};