export type Constructable < T > = new ( ... args ) => T ; /**
 * Base class for all errors generated by the script
 */ export default class TwilioError extends Error { constructor ( msg ? ) { super ( msg ) ; Object . setPrototypeOf ( this , TwilioError . prototype ) ; } param klass public instanceOf = < T extends Error > ( klass ) : boolean => { let instance = this ; while ( instance && instance !== Object . prototype ) { if ( ! instance || ! instance . constructor || ! instance . constructor . name ) { return false ; } if ( klass . name === instance . constructor . name ) { return true ; } instance = Object . getPrototypeOf ( instance ) ; } return false ; } ; }