Adam Shaw 8 سال پیش
والد
کامیت
9c97382a2b
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      src/common/Mixin.ts

+ 9 - 0
src/common/Mixin.ts

@@ -9,4 +9,13 @@ export default class Mixin {
 		});
 	}
 
+	/*
+	will override existing methods
+	*/
+	static mixOver(destClass) {
+		Object.getOwnPropertyNames(this.prototype).forEach((name) => { // copy methods
+			destClass.prototype[name] = this.prototype[name];
+		});
+	}
+
 }