export function boom ( message ? ) { throw new Error ( message ) ; } export function asserts ( condition , err ? ) { if ( condition ) return ; if ( typeof err === 'function' ) err ( ) ; if ( typeof err === 'string' ) boom ( err ) ; if ( err instanceof Error ) throw err ; boom ( ) ; } export function nonNullable < X > ( x ) { asserts ( x != null ) ; return x as NonNullable < X > ; }