/** * Determines whether the array contains a certain element, returning true or false as appropriate (using `Array#includes`). * * It is the same as `Array#includes`, but serves as a type guard in TS. * @param array The array to search in. * @param searchElement The element to search for. * @param fromIndex The position in this array at which to begin searching for searchElement. * * @example * ```typescript * list(1, 2, 3).contains(2); // => true * ['a', 'b', 'c'].contains('b'); // => true * ``` * * @example * ```typescript * const s = 'foo' as string; * if (list('bar', 'baz').contains(s)) { * const s2 = s; // s2 :: 'bar' | 'baz' * } * ``` * * @see {@link Array#includes} */ declare const contains: ( array: AS, searchElement: unknown, fromIndex?: number, ) => searchElement is AS[number]; export default contains; //# sourceMappingURL=contains.d.ts.map