nuke some use of any

This commit is contained in:
Olivier Gagnon
2022-07-14 19:00:10 -04:00
parent 5629c16def
commit 6b630753f0
41 changed files with 122 additions and 153 deletions

View File

@@ -31,7 +31,7 @@ import { HashManager } from "../../Hacknet/HashManager";
import { CityName } from "../../Locations/data/CityNames";
import { MoneySourceTracker } from "../../utils/MoneySourceTracker";
import { Reviver, Generic_toJSON, Generic_fromJSON } from "../../utils/JSONReviver";
import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../../utils/JSONReviver";
import { ISkillProgress } from "../formulas/skill";
import { PlayerAchievement } from "../../Achievements/Achievements";
import { cyrb53 } from "../../utils/StringHelperFunctions";
@@ -420,15 +420,14 @@ export class PlayerObject implements IPlayer {
/**
* Serialize the current object to a JSON save state.
*/
toJSON(): any {
toJSON(): IReviverValue {
return Generic_toJSON("PlayerObject", this);
}
/**
* Initiatizes a PlayerObject object from a JSON save state.
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
static fromJSON(value: any): PlayerObject {
static fromJSON(value: IReviverValue): PlayerObject {
return Generic_fromJSON(PlayerObject, value.data);
}
}