The typescript definition for HacknetServersFormulas.hashUpgradeCost() lists the upgrade name being a number, when it's supposed to be the name of the upgrade as a string. This affects the generated documentation plus user-facing typescript definition files.
Old:
New:
This is the intended mechanism for how the formulas function is written, in which upgName is cast into a string:
The hash manager then takes that string and returns the corresponding record for HashUpgrades: Record<string, HashUpgrade>.
Documentation
[x] If your PR includes ns API function changes, do not manually modify markdown files.
[x] Instead, you can run npm run doc to autogenerate new markdown files that reflect your submitted API changes.
(Versions 2.6.2 and 2.6.3dev)
Correct function signature for hashUpgradeCost
The typescript definition for
HacknetServersFormulas.hashUpgradeCost()
lists the upgrade name being a number, when it's supposed to be the name of the upgrade as a string. This affects the generated documentation plus user-facing typescript definition files.Old:
New:
This is the intended mechanism for how the formulas function is written, in which
upgName
is cast into a string:The hash manager then takes that string and returns the corresponding record for
HashUpgrades: Record<string, HashUpgrade>
.Documentation
npm run doc
to autogenerate new markdown files that reflect your submitted API changes.Issue reported by Yeraze on Discord