I'm trying to use the Dictionary class from from typescript-collections within NodeJS:
/// <reference path="../../../scripts/collections.ts" />
var collections = require('../../../scripts/collections');
export class AsyncProcessorCommand implements interfaces.IAsyncProcessorCommand
{
public static Type = 'RabbitMon.AsyncProcessorCommand:RabbitMon';
public GetType = () => 'RabbitMon.AsyncProcessorCommand:RabbitMon';
public ID: string;
constructor(public Action: string, public Arguments?: collections.Dictionary<string, string>) {
this.ID = uuid.v4();
this.Arguments = new collections.Dictionary<string, string>();
//I've also tried the following
//this.Arguments = new collections.Dictionary<string, string>((key: string) => sha1(key));
}
}
But I keep getting the following error on the new Dictionary
:
TypeError: undefined is not a function
Anyone know what's going on here? I'm also perfectly happy to substitute a better working TS collections library...