UNPKG

@xyo-network/react-shared

Version:

Common React library for all XYO projects that use React

8 lines (7 loc) 217 B
/** * @deprecated use from @xylabs/with instead * */ export const assertDefinedEx = <T>(expr?: T | null, message?: string): T => { if (expr !== null && expr !== undefined) return expr throw new Error(message) }