/** * Does the same as Array.prototype.includes but has better typing */ export declare function includes(haystack: ArrayLike, needle: unknown): needle is THaystack; /** * Like `!includes()` but with proper typing */ export declare function excludes(haystack: ArrayLike, needle: TNeedle): needle is Exclude; /** * Be careful, NaN can return */ export declare function toInt(value: unknown): number; /** * Be careful, NaN can return */ export declare function toFloat(value: unknown): number; export declare function replaceNaN(value: T, replacement: U): T | U; export declare function countTruthy(values: unknown[]): number; export declare function round(value: number, base?: number): number; /** * Parses a CSS selector into tag name with HTML attributes. * Only single element selector are supported (without operators like space, +, >, etc). * * Multiple values can be returned for each attribute. You decide how to handle them. */ export declare function parseSimpleCssSelector(selector: string): [tag: string | undefined, attributes: Record]; export declare function areSetsEqual(set1: Set, set2: Set): boolean; export declare function maxInIterator(iterator: Iterator, getItemScore: (item: T) => number): T | undefined;