Ordered set in Typescript

I’m working on an Angular 2 project, for some reasons I needed to use an ordered set. I could have used a map but as I was discovering Angular 2 & Typescript, I decided to write my own “implementation”.

I wrote a couple of unit tests because Javascript is kind of weird 🙂 (using Typescript is slightly better but still, there are strange behaviors that will lead to errors during runtime)

(Typescript 2.0, Unit tests with Jasmine)

Unit tests :

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.