export declare const EMPTY_ARRAY: readonly never[]; export declare type NonEmptyArray = [T, ...T[]]; export declare const noop: () => void; export declare const assertNever: (value: never) => never; export declare const assertType: (_: T) => void; export declare const binaryCompare: (a: string, b: string) => 1 | -1 | 0; export declare const sameNumber: (a: number, b: number) => boolean; export declare type Comparator = (a: T, b: T) => number; export declare const compareSequences: (a: readonly T[], b: readonly T[], compare: Comparator) => number; /** * Sorts numbers in the order: * 1. -Infinity * 2. Negative real numbers. E.g. -2 * 3. -0.0 * 4. 0.0 * 5. Positive real numbers. E.g. 2 * 6. Infinity * 7. NaN */ export declare const compareNumber: (a: number, b: number) => number; /** * Returns the number of Unicode code points in the given string. */ export declare const unicodeLength: (s: string) => number; /** * Given some string, this function will return the regex pattern that matches exactly the given string. */ export declare const escapeLiteralRegex: (s: string) => string; export declare const isReadonlyArray: (value: unknown) => value is readonly unknown[];