I have an interface and a class which implement it
export interface ITooltip {
new(elem: HTMLElement, options?: ITooltipOptions);
show(): void;
hide(): void;
toggle(): void;
}
export class Tooltip implements ITooltip {
constructor(private elem: HTMLElement, private options?: ITooltipOptions) {
}
....
}
But in console I have an error:
Class 'Tooltip' incorrectly implements interface 'ITooltip'.
Type 'Tooltip' provides no match for the signature 'new (elem: HTMLElement, options?: ITooltipOptions): any'
I don't understand why this error happens.