My constructor can't see method in interface and i have such a problem: Class 'Board' incorrectly implements interface 'IBoard'. Property 'makeBoard' is missing in type 'Board' but required in type 'IBoard'.
How to handle it?
interface ICell {
x: number,
y: number,
showBoard(): void,
ctx: CanvasRenderingContext2D
}
export interface IBoard {
ctx: CanvasRenderingContext2D,
cell: Array<ICell>;
canvas: HTMLCanvasElement,
createCell(x:number, y:number, ctx:CanvasRenderingContext2D, color:string): void,
createCells(): void,
showBoard(): void,
makeBoard(): void
}
export class Board implements IBoard {
cell: Array<ICell> = [];
canvas = document.getElementById('chessBoard-canvas') as HTMLCanvasElement;
ctx = this.canvas.getContext('2d') as CanvasRenderingContext2D;
constructor() {
this.makeBoard();
}
}