es6 class繼承用es5實現

es5實現普通的繼承 // 類的調用檢測 檢測實例是否是new出來的 function _classCallCheck(instance, constructor) { if (!(instance instanceof constructor)) { throw new Error('Class constructor Child cannot be invoked without new')
相關文章
相關標籤/搜索