Inheritance use of 'this'?

Topics: General, Language Specification
Oct 15, 2013 at 5:12 PM
Edited Oct 15, 2013 at 5:13 PM
Why do I get these errors:

(12,33): error TS2081: Supplied parameters do not match any signature of call target.
(12,33): error TS2085: Could not select overload for 'new' expression.

Using this:

class Button extends createjs.MovieClip
{
btnHelper:createjs.ButtonHelper;

constructor(x:number, y:number, width:number, height:number)
{
    super(createjs.MovieClip.INDEPENDENT, 0, false, {out:0, over:1, down:0});
    this.btnHelper  = new createjs.ButtonHelper(this);
}
}

ButtonHelper looks like this:
export class ButtonHelper {
    // properties
    target: Object;
    overLabel: string;
    outLabel: string;
    downLabel: string;
    play: boolean;

    // methods
    constructor(target: MovieClip, outLabel: string, overLabel: string, downLabel: string, play: boolean, hitArea: DisplayObject, hitLabel: string);
    constructor(target: BitmapAnimation, outLabel: string, overLabel: string, downLabel: string, play: boolean, hitArea: DisplayObject, hitLabel: string);
    setEnabled(value: boolean);
    toString(): string;
}
Coordinator
Oct 15, 2013 at 5:16 PM
ButtonHelper's constructor takes 7 arguments and you've only passed it 1.