How to declare multiple dimensional array in TypeScript : In my app, I need to define an element like:

    commandsList:[RegExp, string, string];

but when I tried to push the array elements into it, as below:

    public registerCommand(command:RegExp, cb:string, phrase:string):void{
            this.commandsList.push({ command: command, callback: cb, originalPhrase: phrase });
    }

I got the below error at the `command:command`

> [ts] Argument of type '{ command: RegExp; callback: string;
> originalPhrase: string; }' is not assignable to parameter of type
> 'string | RegExp'.   Object literal may only specify known properties,
> and 'command' does not exist in type 'string | RegExp'. (parameter)
> command: RegExp

The full code is in my other question [here][1].

What is the mistake I've, and how to solve it?


  [1]: http://stackoverflow.com/q/41315930/2441637