aboutsummaryrefslogtreecommitdiff
path: root/src/extensions/ExtensionsTypings.ts
blob: fa8851bb3821f5ad11f87a83f12c6e19828fca9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* eslint-disable @typescript-eslint/no-unused-vars */
interface Array<T> {
    /**
     * 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;
}