import data from "./data.json" ; import { IDataUpgrade } from "./interfaces" ; const UPGRADES_BY_ID = { } ; data . Upgrade . forEach ( ( upgrade ) => { UPGRADES_BY_ID [ upgrade . id ] = upgrade ; } ) ; console . assert ( Object . keys ( UPGRADES_BY_ID ) . length === 124 , `${ Object . keys ( UPGRADES_BY_ID ) . length } is not 124` ) ; export default UPGRADES_BY_ID ;