14 lines
180 B
TypeScript
14 lines
180 B
TypeScript
|
|
interface Number extends Comparable<number> {
|
|
|
|
compareTo(other: number);
|
|
|
|
}
|
|
|
|
Number.prototype.compareTo = function (other: number) {
|
|
|
|
return this.valueOf() == other;
|
|
|
|
}
|
|
|
|
|