torokmark / typescript_collection_framework

:carousel_horse: Collection framework for TypeScript
4 stars 2 forks source link

Using number and string type on SortedSet #10

Open torokmark opened 11 years ago

torokmark commented 11 years ago

number and string types in TypeScript do not implement IComparable.

szabototo89 commented 11 years ago

We can solve this problem, with interfaces:

interface String extends IComparable { }

String.prototype.compareTo = function(..) { ... };