Javascript – How to add function to prototype of an interface that is actually a class?
It is easy to add add function to prototype of a value, for example: Array.prototype.removeAt = function (index) { if (index >= 0 && index < this.length) { this.splice(index, 1); } return this; }; declare global { export interface Array<T>…