export function getValueOrUndefined < T > ( value ) { return value == undefined ? undefined : value ; } export function throwIfNullOrUndefined < T > ( value , name ) { if ( value == undefined ) { throw new Error ( `Expected a ${ name }` ) ; } return value ; } export function getArray < T > ( value ) { const val = getValueOrUndefined ( value ) ; return val === undefined ? [ ] : val ; } export function notNull < T > ( value ) { return value != undefined ; }