Updating HashMap to latest version + commonjs

This commit is contained in:
Vasya Aksyonov
2015-07-28 20:28:14 +05:00
parent 6320bce9d1
commit 94d3eee80b
5 changed files with 233 additions and 23 deletions
+24
View File
@@ -0,0 +1,24 @@
/// <reference path="hashmap-1.1.d.ts"/>
var map : HashMap<string, number> = new HashMap<string, number>();
map.set("foo", 123);
var value : number = map.get("foo");
map.has("foo");
map.remove("foo");
var keys : string[] = map.keys();
var values : number[] = map.values();
var count : number = map.count();
map.forEach(function(value : number, key : string) : void {
console.log(key);
console.log(value);
});
map.clear();