TypeScript/tests/baselines/reference/protoAssignment.js

22 lines
328 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [protoAssignment.ts]
interface Number extends Comparable<number> {
compareTo(other: number);
}
Number.prototype.compareTo = function (other: number) {
return this.valueOf() == other;
}
//// [protoAssignment.js]
Number.prototype.compareTo = function (other) {
return this.valueOf() == other;
};