Switching to definitely assigned parameters
This allows us to go in "full strict mode" (yeah!) See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#strict-class-initialization
This commit is contained in:
@@ -13,8 +13,8 @@ export interface HasMovedEvent {
|
||||
}
|
||||
|
||||
export class GameManager {
|
||||
private playerName: string;
|
||||
private characterLayers: string[];
|
||||
private playerName!: string;
|
||||
private characterLayers!: string[];
|
||||
|
||||
public setPlayerName(name: string): void {
|
||||
this.playerName = name;
|
||||
|
||||
Reference in New Issue
Block a user