import { BeanWrapper } from '../core' ; import { StatedBeanClass , StatedBeanWrapper } from '../core/Symbols' ; export function isFunction ( func ) { return typeof func === 'function' ; } export function isStatedBeanClass ( type ) { return Object . hasOwnProperty . call ( type , StatedBeanClass ) ; } export function getBeanWrapper < T > ( obj ) { if ( Object . hasOwnProperty . call ( obj , StatedBeanWrapper ) ) { return Reflect . get ( ( obj as unknown ) as object , StatedBeanWrapper ) ; } return undefined ; } export function isPromise < T = unknown > ( value ) { return ! ! value && typeof ( value as { then : unknown ; } ) . then === 'function' ; } export function getPropertiesWithoutFunction < T > ( obj ) { if ( ! obj ) { return undefined ; } return Object . keys ( obj ) . filter ( ( key ) => typeof obj [ key ] !== 'function' ) ; }