export function findPrevious(terminal: any, term: string): boolean {
  if (!terminal._searchHelper) {
    terminal.searchHelper = new SearchHelper(terminal);
  }
  return (<SearchHelper>terminal.searchHelper).findPrevious(term);
};

export function apply(terminalConstructor) {
  terminalConstructor.prototype.findNext = function(term) {
    return findNext(this, term);
  }