mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import { Factions } from "../../Faction/Factions";
|
||||
import { CityName } from "../../Locations/data/CityNames";
|
||||
import { LocationName } from "../../Locations/data/LocationNames";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../../utils/JSONReviver";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../utils/JSONReviver";
|
||||
import { BladeburnerConstants } from "../../Bladeburner/data/Constants";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
import { capitalizeFirstLetter, capitalizeEachWord } from "../../utils/StringHelperFunctions";
|
||||
@@ -1236,15 +1236,14 @@ export class Sleeve extends Person {
|
||||
/**
|
||||
* Serialize the current object to a JSON save state.
|
||||
*/
|
||||
toJSON(): any {
|
||||
toJSON(): IReviverValue {
|
||||
return Generic_toJSON("Sleeve", this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiatizes a Sleeve object from a JSON save state.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
static fromJSON(value: any): Sleeve {
|
||||
static fromJSON(value: IReviverValue): Sleeve {
|
||||
return Generic_fromJSON(Sleeve, value.data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user