/* eslint-disable @typescript-eslint/no-unused-vars */ interface Array { /** * returns the last element of the array or undefined */ lastElement(): T; /** * if val is in the list, it returns its index, otherwise undefined; * @param val */ getIndex(val: T): number | undefined; } interface String { removeTrailingNewlines(): string; hasNewline(): boolean; }