Move to Typescript.

This commit is contained in:
Manuel Friedli 2023-04-17 02:43:36 +02:00
parent 34618860a4
commit ac964ddd3f
16 changed files with 482 additions and 119 deletions

18
src/state/state.ts Normal file
View file

@ -0,0 +1,18 @@
import Coordinates from "../model/Coordinates";
import Maze from "../model/Maze";
export interface State {
errorMessage: string | null,
loading: boolean,
maze: Maze | null,
showSolution: boolean,
userPath: Coordinates[]
}
export const INITIAL_STATE: State = {
errorMessage: null,
loading: false,
maze: null,
showSolution: false,
userPath: []
};