I am developing a TypeScript game and encountered an issue while creating a player class. The error I'm getting is:
Property 'playerInformation' does not exist on type 'Player'
Here is the code snippet:
export default class Player {
constructor(playerInformation={}) {
console.log("Player initialized");
this.playerInformation = playerInformation
}
test() {
console.log(this.playerInformation);
}
}
Can anyone suggest a solution for this problem?