11import React , { Component } from "react" ;
22import Row from "./Row" ;
3- import { BoardText , BoardContent , Scoreboard , Player } from "../types/types" ;
3+ import { BoardContent , Scoreboard , Player } from "../types/types" ;
44
55type BoardState = {
66 board : BoardContent ;
@@ -11,7 +11,7 @@ type BoardState = {
1111} ;
1212
1313class Board extends Component < { } , BoardState > {
14- constructor ( props : any ) {
14+ constructor ( props : unknown ) {
1515 super ( props ) ;
1616 this . state = {
1717 board : this . newBoard ( ) ,
@@ -25,7 +25,7 @@ class Board extends Component<{}, BoardState> {
2525 this . handleBoxClick = this . handleBoxClick . bind ( this ) ;
2626 }
2727
28- componentDidUpdate ( ) {
28+ componentDidUpdate ( ) : void {
2929 this . checkForWinner ( ) ;
3030 }
3131
@@ -127,7 +127,7 @@ class Board extends Component<{}, BoardState> {
127127 this . setState ( { board : boardCopy , currentPlayer : newPlayer } ) ;
128128 }
129129
130- render ( ) {
130+ render ( ) : JSX . Element {
131131 const rows : Array < JSX . Element > = [ ] ;
132132 for ( let i = 0 ; i < 3 ; i ++ ) {
133133 rows . push (
@@ -139,7 +139,7 @@ class Board extends Component<{}, BoardState> {
139139 />
140140 ) ;
141141 }
142- const { X, O } : Scoreboard = this . state . scoreboard ;
142+ // const { X, O }: Scoreboard = this.state.scoreboard;
143143
144144 return (
145145 < div className = "board" >
0 commit comments