export default class List extends Array { /** * Appends elements to the list if the list does not already contain them. * Returns true if all elements were inserted. * Elements are not inserted if they already exist. * @param elements - Elements that will be appended to the list. * @example * const a = new List(1, 2) * a.add(2) // false * a.add(2, 3) // false * a.add(4) // true */ add(...elements: T[]): boolean; /** * Removes elements from the list. * Returns false if an element was not contained in the list. * @param elements - Elements that will be removed from the list. * @example * const a = new List(1, 2) * a.remove(1) // true * a.remove(2, 3) // false * a.remove(4) // false */ remove(...elements: T[]): boolean; /** * Returns a list containing all elements that only this list OR only the other list contains. * @param other - The list to compare this list to. * @example * const a = new List(1, 2) * const b = new list(2, 3) * a.uncovered(b) // [ 1, 3 ] */ diff(other: T[]): List; /** * Returns a list containing all elements of this list that are contained in the other array/list. * @param other - The list to compare this list to. * @example * const a = new List(1, 2) * const b = new list(2, 3) * a.uncovered(b) // [ 2 ] */ covered(other: T[]): List; /** * Returns a list containing all elements of this list that are not contained in the other array/list. * @param other - The list to compare this list to. * @example * const a = new List(1, 2) * const b = new list(2, 3) * a.uncovered(b) // [ 1 ] */ uncovered(other: T[]): List; }