export function assert ( condition , msg ? ) { if ( ! condition ) { throw new Error ( msg ) ; } } export function assertIsDefined < T > ( value ) { if ( value === undefined || value === null ) { throw new Error ( `Expected 'value' to be defined, but received ${ value }` ) ; } }