export function assertNever < T extends never > ( value ) { throw new Error ( `This code should never execute according to the type system. Please check the call stack, asserted value: ${ value }.` ) ; } export function createError ( message , name ? ) { const error = new Error ( message ) ; error . name = name || 'Error' ; error . description = message ; return error ; } export const noop = ( ) => { } ; export const identity = < T > ( x ) => x ;