Something went wrong. Try again.
because I got bored of customising my CV for every job
Something went wrong. Try again.
TypeScript
123456789101112131415161718/** * Utility function to throw an Error with the given message. * This is useful for creating never-returning functions that help with TypeScript's control flow analysis. * * @param message - The error message to throw * @throws {Error} Always throws an Error * @returns {never} This function never returns * * @example * ```typescript * const value = getValue() ?? raise("Value not found"); * // TypeScript knows value is not null/undefined after this line * ``` */export const raise = (message: string): never => { throw new Error(message);};