mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
nuke some use of any
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user