import { clsx, type ClassValue } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } /** * Helper function to ensure exhaustive checking in switch statements and conditional logic. * TypeScript will show a compile error if not all cases are handled. * @param value - The value that should never be reached * @throws Error with the unexpected value */ export function assertUnreachable(value: never): never { throw new Error(`Unreachable code reached with value: ${JSON.stringify(value)}`); } export function getStringLiteralChecker(arr: T) { return (value:string): value is T[number] => { return arr.includes(value); } }