/** * Interface that designates a particular value as able to be constructed. */ export default interface Instantiable { new(...args: any[]): T } /** * Returns true if the given value is instantiable. * @param what */ const isInstantiable = (what: any): what is Instantiable => { return (typeof what === 'object' || typeof what === 'function') && 'constructor' in what && typeof what.constructor === 'function' } export { isInstantiable }