@jeremyckahn/farmhand 1.19.21 → 1.19.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/dist/assets/{index-CG_lY1MJ.js → index-BjAIF9CZ.js} +7 -7
  2. package/dist/assets/{index-CG_lY1MJ.js.map → index-BjAIF9CZ.js.map} +1 -1
  3. package/dist/index.html +1 -1
  4. package/dist/service-worker.js +1 -1
  5. package/dist/service-worker.js.map +1 -1
  6. package/package.json +2 -3
  7. package/src/common/services/{randomNumber.ts → randomNumber.js} +0 -1
  8. package/src/common/{utils.ts → utils.js} +1 -1
  9. package/src/components/AccountingView/{AccountingView.tsx → AccountingView.js} +0 -1
  10. package/src/components/AchievementsView/{AchievementsView.tsx → AchievementsView.js} +0 -2
  11. package/src/components/AnimatedNumber/{AnimatedNumber.tsx → AnimatedNumber.js} +0 -3
  12. package/src/components/AppBar/{AppBar.tsx → AppBar.js} +0 -3
  13. package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.tsx → BailOutErrorBoundary.js} +0 -2
  14. package/src/components/Cellar/{CellarInventoryTabPanel.tsx → CellarInventoryTabPanel.js} +0 -2
  15. package/src/components/Cellar/{Keg.tsx → Keg.js} +1 -0
  16. package/src/components/ContextPane/{ContextPane.tsx → ContextPane.js} +0 -2
  17. package/src/components/ContextPane/{ContextPane.test.tsx → ContextPane.test.js} +0 -3
  18. package/src/components/CowCard/Bloodline/{Bloodline.test.tsx → Bloodline.test.js} +3 -6
  19. package/src/components/CowCard/{CowCard.tsx → CowCard.js} +2 -4
  20. package/src/components/CowCard/Subheader/{Subheader.tsx → Subheader.js} +0 -1
  21. package/src/components/CowPen/{Cow.tsx → Cow.js} +1 -15
  22. package/src/components/CowPen/{CowPen.test.tsx → CowPen.test.js} +1 -15
  23. package/src/components/CowPen/{Tumbleweeds.tsx → Tumbleweeds.js} +1 -2
  24. package/src/components/Farmhand/{Farmhand.context.tsx → Farmhand.context.js} +2 -2
  25. package/src/components/Farmhand/{Farmhand.tsx → Farmhand.js} +16 -83
  26. package/src/components/FermentationRecipeList/{FermentationRecipe.tsx → FermentationRecipe.js} +3 -4
  27. package/src/components/FermentationRecipeList/{FermentationRecipeList.tsx → FermentationRecipeList.js} +0 -3
  28. package/src/components/FermentationRecipeList/{FermentationRecipeList.test.tsx → FermentationRecipeList.test.js} +0 -5
  29. package/src/components/Field/{Field.tsx → Field.js} +1 -6
  30. package/src/components/Field/{Field.test.tsx → Field.test.js} +1 -0
  31. package/src/components/Home/{Home.tsx → Home.js} +0 -1
  32. package/src/components/Home/{SnowBackground.tsx → SnowBackground.js} +0 -2
  33. package/src/components/Inventory/{Inventory.tsx → Inventory.js} +2 -9
  34. package/src/components/Item/{Item.tsx → Item.js} +1 -2
  35. package/src/components/LogView/{LogView.tsx → LogView.js} +1 -2
  36. package/src/components/Navigation/{Navigation.tsx → Navigation.js} +1 -0
  37. package/src/components/NotificationSystem/{NotificationSystem.tsx → NotificationSystem.js} +1 -0
  38. package/src/components/OnlinePeersView/{OnlinePeersView.tsx → OnlinePeersView.js} +1 -1
  39. package/src/components/Plot/{Plot.tsx → Plot.js} +0 -5
  40. package/src/components/Plot/{Plot.test.tsx → Plot.test.js} +8 -8
  41. package/src/components/PriceEventView/{PriceEventView.test.tsx → PriceEventView.test.js} +0 -1
  42. package/src/components/ProgressBar/{ProgressBar.tsx → ProgressBar.js} +0 -2
  43. package/src/components/QuantityInput/{QuantityInput.tsx → QuantityInput.js} +0 -1
  44. package/src/components/Recipe/{Recipe.tsx → Recipe.js} +2 -1
  45. package/src/components/SettingsView/{RandomSeedInput.tsx → RandomSeedInput.js} +1 -1
  46. package/src/components/Shop/{Shop.tsx → Shop.js} +1 -2
  47. package/src/components/Stage/{Stage.tsx → Stage.js} +3 -6
  48. package/src/components/Stage/{Stage.test.tsx → Stage.test.js} +0 -1
  49. package/src/components/Toolbelt/{Toolbelt.tsx → Toolbelt.js} +0 -3
  50. package/src/components/UpgradePurchase/{UpgradePurchase.tsx → UpgradePurchase.js} +1 -0
  51. package/src/components/WineRecipeList/{WineRecipe.tsx → WineRecipe.js} +1 -2
  52. package/src/components/WineRecipeList/{WineRecipe.test.tsx → WineRecipe.test.js} +1 -10
  53. package/src/components/WineRecipeList/{WineRecipeList.tsx → WineRecipeList.js} +0 -1
  54. package/src/components/Workshop/{ForgeTabPanel.tsx → ForgeTabPanel.js} +0 -1
  55. package/src/components/Workshop/{getUpgradesAvailable.ts → getUpgradesAvailable.js} +0 -2
  56. package/src/components/Workshop/{getUpgradesAvailable.test.ts → getUpgradesAvailable.test.js} +0 -1
  57. package/src/{constants.ts → constants.js} +2 -2
  58. package/src/data/{achievements.ts → achievements.js} +0 -9
  59. package/src/data/{achievements.test.ts → achievements.test.js} +1 -2
  60. package/src/data/{crop.ts → crop.js} +4 -5
  61. package/src/data/crops/{asparagus.ts → asparagus.js} +0 -2
  62. package/src/data/crops/{carrot.ts → carrot.js} +0 -2
  63. package/src/data/crops/{corn.ts → corn.js} +0 -2
  64. package/src/data/crops/{garlic.ts → garlic.js} +0 -2
  65. package/src/data/crops/{grape.ts → grape.js} +7 -11
  66. package/src/data/crops/{jalapeno.ts → jalapeno.js} +0 -2
  67. package/src/data/crops/{olive.ts → olive.js} +0 -2
  68. package/src/data/crops/{onion.ts → onion.js} +0 -2
  69. package/src/data/crops/{pea.ts → pea.js} +0 -2
  70. package/src/data/crops/{potato.ts → potato.js} +0 -2
  71. package/src/data/crops/{pumpkin.ts → pumpkin.js} +0 -2
  72. package/src/data/crops/{soybean.ts → soybean.js} +0 -2
  73. package/src/data/crops/{spinach.ts → spinach.js} +0 -2
  74. package/src/data/crops/{strawberry.ts → strawberry.js} +0 -2
  75. package/src/data/crops/{sunflower.ts → sunflower.js} +0 -2
  76. package/src/data/crops/{sweet-potato.ts → sweet-potato.js} +0 -2
  77. package/src/data/crops/{tomato.ts → tomato.js} +0 -2
  78. package/src/data/crops/{watermelon.ts → watermelon.js} +0 -2
  79. package/src/data/crops/{wheat.ts → wheat.js} +0 -2
  80. package/src/data/{items.ts → items.js} +12 -12
  81. package/src/data/{levels.ts → levels.js} +0 -28
  82. package/src/data/{maps.ts → maps.js} +1 -2
  83. package/src/data/ores/{bronzeOre.ts → bronzeOre.js} +1 -1
  84. package/src/data/ores/{coal.ts → coal.js} +1 -1
  85. package/src/data/ores/{goldOre.ts → goldOre.js} +1 -1
  86. package/src/data/ores/{ironOre.ts → ironOre.js} +1 -1
  87. package/src/data/ores/{saltRock.ts → saltRock.js} +1 -1
  88. package/src/data/ores/{silverOre.ts → silverOre.js} +1 -1
  89. package/src/data/ores/{stone.ts → stone.js} +1 -1
  90. package/src/data/{recipes.ts → recipes.js} +43 -43
  91. package/src/{enums.ts → enums.js} +28 -28
  92. package/src/factories/{CoalFactory.ts → CoalFactory.js} +0 -2
  93. package/src/factories/{OreFactory.ts → OreFactory.js} +0 -3
  94. package/src/factories/{ResourceFactory.ts → ResourceFactory.js} +0 -4
  95. package/src/factories/{ResourceFactory.test.ts → ResourceFactory.test.js} +0 -4
  96. package/src/factories/{StoneFactory.ts → StoneFactory.js} +0 -1
  97. package/src/{fetch-utils.ts → fetch-utils.js} +0 -2
  98. package/src/game-logic/{field-purchase.test.ts → field-purchase.test.js} +2 -4
  99. package/src/game-logic/reducers/{applyCrows.ts → applyCrows.js} +0 -3
  100. package/src/game-logic/reducers/{applyLoanInterest.ts → applyLoanInterest.js} +1 -1
  101. package/src/game-logic/reducers/{applyPrecipitation.ts → applyPrecipitation.js} +6 -6
  102. package/src/game-logic/reducers/{computeStateForNextDay.ts → computeStateForNextDay.js} +2 -2
  103. package/src/game-logic/reducers/{makeFermentationRecipe.ts → makeFermentationRecipe.js} +0 -1
  104. package/src/game-logic/reducers/{makeWine.ts → makeWine.js} +0 -1
  105. package/src/game-logic/reducers/{makeWine.test.ts → makeWine.test.js} +2 -0
  106. package/src/game-logic/reducers/{minePlot.ts → minePlot.js} +0 -1
  107. package/src/game-logic/reducers/{processCellarSpoilage.ts → processCellarSpoilage.js} +1 -0
  108. package/src/game-logic/reducers/{processCellarSpoilage.test.ts → processCellarSpoilage.test.js} +5 -0
  109. package/src/game-logic/reducers/{processCowFertilizerProduction.ts → processCowFertilizerProduction.js} +1 -1
  110. package/src/game-logic/reducers/{processLevelUp.ts → processLevelUp.js} +0 -3
  111. package/src/game-logic/reducers/{purchaseField.test.ts → purchaseField.test.js} +0 -2
  112. package/src/game-logic/reducers/{purchaseForest.test.tsx → purchaseForest.test.js} +2 -6
  113. package/src/game-logic/reducers/{rotateNotificationLogs.ts → rotateNotificationLogs.js} +1 -1
  114. package/src/game-logic/reducers/{sellItem.test.ts → sellItem.test.js} +3 -0
  115. package/src/game-logic/reducers/{sellKeg.ts → sellKeg.js} +1 -0
  116. package/src/game-logic/reducers/{spawnWeeds.ts → spawnWeeds.js} +0 -1
  117. package/src/game-logic/reducers/{updateAchievements.ts → updateAchievements.js} +0 -1
  118. package/src/game-logic/reducers/{updatePeer.ts → updatePeer.js} +0 -1
  119. package/src/game-logic/reducers/{updatePeer.test.ts → updatePeer.test.js} +4 -0
  120. package/src/game-logic/reducers/{updatePlotShoveledState.test.ts → updatePlotShoveledState.test.js} +1 -0
  121. package/src/handlers/{peer-events.ts → peer-events.js} +0 -5
  122. package/src/handlers/{ui-events.tsx → ui-events.js} +6 -88
  123. package/src/handlers/{ui-events.test.ts → ui-events.test.js} +0 -2
  124. package/src/{index.tsx → index.js} +0 -2
  125. package/src/scripts/{generate-crop-table.ts → generate-crop-table.js} +4 -5
  126. package/src/services/{cellar.test.ts → cellar.test.js} +1 -1
  127. package/src/services/{wine.ts → wine.js} +0 -1
  128. package/src/shell/{notifications.test.ts → notifications.test.js} +13 -19
  129. package/src/{templates.ts → templates.js} +0 -8
  130. package/src/test-utils/{index.ts → index.js} +3 -3
  131. package/src/test-utils/stubs/{getKegStub.ts → getKegStub.js} +0 -1
  132. package/src/utils/{farmProductsSold.tsx → farmProductsSold.js} +0 -2
  133. package/src/utils/{getCropLifecycleDuration.ts → getCropLifecycleDuration.js} +0 -1
  134. package/src/utils/{getCropsAvailableToFerment.ts → getCropsAvailableToFerment.js} +0 -1
  135. package/src/utils/{getInventoryQuantityMap.ts → getInventoryQuantityMap.js} +0 -1
  136. package/src/utils/{getLevelEntitlements.ts → getLevelEntitlements.js} +0 -4
  137. package/src/utils/{getMaxYieldOfFermentationRecipe.ts → getMaxYieldOfFermentationRecipe.js} +0 -1
  138. package/src/utils/{getWineVarietiesAvailableToMake.ts → getWineVarietiesAvailableToMake.js} +0 -2
  139. package/src/utils/{index.tsx → index.js} +11 -25
  140. package/src/utils/{index.test.ts → index.test.js} +2 -0
  141. package/src/utils/{isItemAFarmProduct.ts → isItemAFarmProduct.js} +1 -1
  142. package/src/utils/{memoize.ts → memoize.js} +0 -2
  143. package/src/utils/{totalIngredientsInRecipe.ts → totalIngredientsInRecipe.js} +0 -2
  144. /package/src/common/{constants.ts → constants.js} +0 -0
  145. /package/src/common/services/{randomNumber.test.ts → randomNumber.test.js} +0 -0
  146. /package/src/common/{utils.test.ts → utils.test.js} +0 -0
  147. /package/src/components/AccountingView/{AccountingView.test.tsx → AccountingView.test.js} +0 -0
  148. /package/src/components/AccountingView/{index.ts → index.js} +0 -0
  149. /package/src/components/Achievement/{Achievement.tsx → Achievement.js} +0 -0
  150. /package/src/components/Achievement/{Achievement.test.tsx → Achievement.test.js} +0 -0
  151. /package/src/components/Achievement/{index.ts → index.js} +0 -0
  152. /package/src/components/AchievementsView/{AchievementsView.test.tsx → AchievementsView.test.js} +0 -0
  153. /package/src/components/AchievementsView/{index.ts → index.js} +0 -0
  154. /package/src/components/AnimatedNumber/{AnimatedNumber.test.tsx → AnimatedNumber.test.js} +0 -0
  155. /package/src/components/AnimatedNumber/{index.ts → index.js} +0 -0
  156. /package/src/components/AppBar/{AppBar.test.tsx → AppBar.test.js} +0 -0
  157. /package/src/components/AppBar/{index.ts → index.js} +0 -0
  158. /package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.test.tsx → BailOutErrorBoundary.test.js} +0 -0
  159. /package/src/components/BailOutErrorBoundary/{index.ts → index.js} +0 -0
  160. /package/src/components/Cellar/{Cellar.tsx → Cellar.js} +0 -0
  161. /package/src/components/Cellar/{FermentationTabPanel.tsx → FermentationTabPanel.js} +0 -0
  162. /package/src/components/Cellar/TabPanel/{index.tsx → index.js} +0 -0
  163. /package/src/components/Cellar/{WinemakingTabPanel.tsx → WinemakingTabPanel.js} +0 -0
  164. /package/src/components/Cellar/{index.ts → index.js} +0 -0
  165. /package/src/components/ChatRoom/{ChatRoom.tsx → ChatRoom.js} +0 -0
  166. /package/src/components/ChatRoom/{index.ts → index.js} +0 -0
  167. /package/src/components/ContextPane/{index.ts → index.js} +0 -0
  168. /package/src/components/CowCard/Bloodline/{Bloodline.tsx → Bloodline.js} +0 -0
  169. /package/src/components/CowCard/Bloodline/{index.ts → index.js} +0 -0
  170. /package/src/components/CowCard/{CowCard.test.tsx → CowCard.test.js} +0 -0
  171. /package/src/components/CowCard/Subheader/{Subheader.test.tsx → Subheader.test.js} +0 -0
  172. /package/src/components/CowCard/Subheader/{index.ts → index.js} +0 -0
  173. /package/src/components/CowCard/{index.ts → index.js} +0 -0
  174. /package/src/components/CowPen/{CowPen.tsx → CowPen.js} +0 -0
  175. /package/src/components/CowPen/{index.ts → index.js} +0 -0
  176. /package/src/components/CowPenContextMenu/{CowPenContextMenu.tsx → CowPenContextMenu.js} +0 -0
  177. /package/src/components/CowPenContextMenu/{CowPenContextMenu.test.tsx → CowPenContextMenu.test.js} +0 -0
  178. /package/src/components/CowPenContextMenu/TabPanel/{index.tsx → index.js} +0 -0
  179. /package/src/components/CowPenContextMenu/{index.ts → index.js} +0 -0
  180. /package/src/components/Elements/{index.ts → index.js} +0 -0
  181. /package/src/components/Farmhand/{Farmhand.test.ts → Farmhand.test.js} +0 -0
  182. /package/src/components/Farmhand/{FarmhandReducers.tsx → FarmhandReducers.js} +0 -0
  183. /package/src/components/Farmhand/helpers/{getInventoryQuantities.ts → getInventoryQuantities.js} +0 -0
  184. /package/src/components/Farmhand/helpers/{getInventoryQuantities.test.ts → getInventoryQuantities.test.js} +0 -0
  185. /package/src/components/Farmhand/{index.ts → index.js} +0 -0
  186. /package/src/components/Field/{index.ts → index.js} +0 -0
  187. /package/src/components/Forest/{Forest.tsx → Forest.js} +0 -0
  188. /package/src/components/Forest/{index.ts → index.js} +0 -0
  189. /package/src/components/Home/{Home.test.tsx → Home.test.js} +0 -0
  190. /package/src/components/Home/{index.ts → index.js} +0 -0
  191. /package/src/components/IngredientsList/{IngredientsList.tsx → IngredientsList.js} +0 -0
  192. /package/src/components/IngredientsList/{IngredientsList.test.tsx → IngredientsList.test.js} +0 -0
  193. /package/src/components/IngredientsList/{index.ts → index.js} +0 -0
  194. /package/src/components/Inventory/{Inventory.test.tsx → Inventory.test.js} +0 -0
  195. /package/src/components/Inventory/{index.ts → index.js} +0 -0
  196. /package/src/components/Item/{Item.test.tsx → Item.test.js} +0 -0
  197. /package/src/components/Item/{index.ts → index.js} +0 -0
  198. /package/src/components/KeybindingsView/{KeybindingsView.tsx → KeybindingsView.js} +0 -0
  199. /package/src/components/KeybindingsView/{KeybindingsView.test.tsx → KeybindingsView.test.js} +0 -0
  200. /package/src/components/KeybindingsView/{index.ts → index.js} +0 -0
  201. /package/src/components/LogView/{LogView.test.tsx → LogView.test.js} +0 -0
  202. /package/src/components/LogView/{index.ts → index.js} +0 -0
  203. /package/src/components/Navigation/{DayAndProgressContainer.tsx → DayAndProgressContainer.js} +0 -0
  204. /package/src/components/Navigation/{Navigation.test.tsx → Navigation.test.js} +0 -0
  205. /package/src/components/Navigation/{index.ts → index.js} +0 -0
  206. /package/src/components/NotificationSystem/{NotificationSystem.test.tsx → NotificationSystem.test.js} +0 -0
  207. /package/src/components/NotificationSystem/{index.ts → index.js} +0 -0
  208. /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.tsx → OnlinePeer.js} +0 -0
  209. /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.test.tsx → OnlinePeer.test.js} +0 -0
  210. /package/src/components/OnlinePeersView/OnlinePeer/{index.ts → index.js} +0 -0
  211. /package/src/components/OnlinePeersView/{OnlinePeersView.test.tsx → OnlinePeersView.test.js} +0 -0
  212. /package/src/components/OnlinePeersView/{index.ts → index.js} +0 -0
  213. /package/src/components/Plot/{index.ts → index.js} +0 -0
  214. /package/src/components/PriceEventView/{PriceEventView.tsx → PriceEventView.js} +0 -0
  215. /package/src/components/PriceEventView/{index.ts → index.js} +0 -0
  216. /package/src/components/ProgressBar/{ProgressBar.test.tsx → ProgressBar.test.js} +0 -0
  217. /package/src/components/ProgressBar/{index.ts → index.js} +0 -0
  218. /package/src/components/QuantityInput/{QuantityInput.test.tsx → QuantityInput.test.js} +0 -0
  219. /package/src/components/QuantityInput/{index.ts → index.js} +0 -0
  220. /package/src/components/QuickSelect/{QuickSelect.tsx → QuickSelect.js} +0 -0
  221. /package/src/components/QuickSelect/{QuickSelect.test.tsx → QuickSelect.test.js} +0 -0
  222. /package/src/components/QuickSelect/{index.ts → index.js} +0 -0
  223. /package/src/components/Recipe/{Recipe.test.tsx → Recipe.test.js} +0 -0
  224. /package/src/components/Recipe/{index.ts → index.js} +0 -0
  225. /package/src/components/RecipeList/{RecipeList.tsx → RecipeList.js} +0 -0
  226. /package/src/components/SearchBar/{SearchBar.tsx → SearchBar.js} +0 -0
  227. /package/src/components/SearchBar/{SearchBar.test.tsx → SearchBar.test.js} +0 -0
  228. /package/src/components/SearchBar/{index.ts → index.js} +0 -0
  229. /package/src/components/SettingsView/{RandomSeedInput.test.tsx → RandomSeedInput.test.js} +0 -0
  230. /package/src/components/SettingsView/{SettingsView.tsx → SettingsView.js} +0 -0
  231. /package/src/components/SettingsView/{SettingsView.test.tsx → SettingsView.test.js} +0 -0
  232. /package/src/components/SettingsView/{index.ts → index.js} +0 -0
  233. /package/src/components/Shop/{Shop.test.tsx → Shop.test.js} +0 -0
  234. /package/src/components/Shop/TabPanel/{index.tsx → index.js} +0 -0
  235. /package/src/components/Shop/{index.ts → index.js} +0 -0
  236. /package/src/components/Stage/{index.ts → index.js} +0 -0
  237. /package/src/components/StatsView/{StatsView.tsx → StatsView.js} +0 -0
  238. /package/src/components/StatsView/{StatsView.test.tsx → StatsView.test.js} +0 -0
  239. /package/src/components/StatsView/{index.ts → index.js} +0 -0
  240. /package/src/components/TierPurchase/{TierPurchase.tsx → TierPurchase.js} +0 -0
  241. /package/src/components/TierPurchase/{TierPurchase.test.tsx → TierPurchase.test.js} +0 -0
  242. /package/src/components/TierPurchase/{index.ts → index.js} +0 -0
  243. /package/src/components/Toolbelt/{Toolbelt.test.tsx → Toolbelt.test.js} +0 -0
  244. /package/src/components/Toolbelt/{index.ts → index.js} +0 -0
  245. /package/src/components/UpdateNotifier/{UpdateNotifier.tsx → UpdateNotifier.js} +0 -0
  246. /package/src/components/UpdateNotifier/{index.ts → index.js} +0 -0
  247. /package/src/components/UpgradePurchase/{UpgradePurchase.test.tsx → UpgradePurchase.test.js} +0 -0
  248. /package/src/components/UpgradePurchase/{index.ts → index.js} +0 -0
  249. /package/src/components/Workshop/{KitchenTabPanel.tsx → KitchenTabPanel.js} +0 -0
  250. /package/src/components/Workshop/{RecyclingTabPanel.tsx → RecyclingTabPanel.js} +0 -0
  251. /package/src/components/Workshop/TabPanel/{index.tsx → index.js} +0 -0
  252. /package/src/components/Workshop/{Workshop.tsx → Workshop.js} +0 -0
  253. /package/src/components/Workshop/{Workshop.test.tsx → Workshop.test.js} +0 -0
  254. /package/src/components/Workshop/{index.ts → index.js} +0 -0
  255. /package/src/{config.ts → config.js} +0 -0
  256. /package/src/data/__mocks__/{items.ts → items.js} +0 -0
  257. /package/src/data/__mocks__/{maps.ts → maps.js} +0 -0
  258. /package/src/data/__mocks__/{recipes.ts → recipes.js} +0 -0
  259. /package/src/data/__mocks__/{shop-inventory.ts → shop-inventory.js} +0 -0
  260. /package/src/data/crops/{index.ts → index.js} +0 -0
  261. /package/src/data/{fruit-names.ts → fruit-names.js} +0 -0
  262. /package/src/data/{items-map.ts → items-map.js} +0 -0
  263. /package/src/data/ores/{index.ts → index.js} +0 -0
  264. /package/src/data/{shop-inventory-cow.ts → shop-inventory-cow.js} +0 -0
  265. /package/src/data/{shop-inventory.ts → shop-inventory.js} +0 -0
  266. /package/src/data/{tools.ts → tools.js} +0 -0
  267. /package/src/data/{upgrades.ts → upgrades.js} +0 -0
  268. /package/src/factories/{CoalFactory.test.ts → CoalFactory.test.js} +0 -0
  269. /package/src/factories/{OreFactory.test.ts → OreFactory.test.js} +0 -0
  270. /package/src/factories/{StoneFactory.test.ts → StoneFactory.test.js} +0 -0
  271. /package/src/factories/{index.ts → index.js} +0 -0
  272. /package/src/game-logic/cows/{cow-selection.test.ts → cow-selection.test.js} +0 -0
  273. /package/src/game-logic/{item-purchase.test.ts → item-purchase.test.js} +0 -0
  274. /package/src/game-logic/{item-sell.test.ts → item-sell.test.js} +0 -0
  275. /package/src/game-logic/reducers/{addCowToInventory.ts → addCowToInventory.js} +0 -0
  276. /package/src/game-logic/reducers/{addExperience.ts → addExperience.js} +0 -0
  277. /package/src/game-logic/reducers/{addExperience.test.ts → addExperience.test.js} +0 -0
  278. /package/src/game-logic/reducers/{addItemToInventory.ts → addItemToInventory.js} +0 -0
  279. /package/src/game-logic/reducers/{addItemToInventory.test.ts → addItemToInventory.test.js} +0 -0
  280. /package/src/game-logic/reducers/{addKegToCellarInventory.ts → addKegToCellarInventory.js} +0 -0
  281. /package/src/game-logic/reducers/{addPeer.ts → addPeer.js} +0 -0
  282. /package/src/game-logic/reducers/{addRevenue.ts → addRevenue.js} +0 -0
  283. /package/src/game-logic/reducers/{adjustLoan.ts → adjustLoan.js} +0 -0
  284. /package/src/game-logic/reducers/{adjustLoan.test.ts → adjustLoan.test.js} +0 -0
  285. /package/src/game-logic/reducers/{applyCrows.test.ts → applyCrows.test.js} +0 -0
  286. /package/src/game-logic/reducers/{applyLoanInterest.test.ts → applyLoanInterest.test.js} +0 -0
  287. /package/src/game-logic/reducers/{applyPrecipitation.test.ts → applyPrecipitation.test.js} +0 -0
  288. /package/src/game-logic/reducers/{changeCowAutomaticHugState.ts → changeCowAutomaticHugState.js} +0 -0
  289. /package/src/game-logic/reducers/{changeCowAutomaticHugState.test.ts → changeCowAutomaticHugState.test.js} +0 -0
  290. /package/src/game-logic/reducers/{changeCowBreedingPenResident.ts → changeCowBreedingPenResident.js} +0 -0
  291. /package/src/game-logic/reducers/{changeCowBreedingPenResident.test.ts → changeCowBreedingPenResident.test.js} +0 -0
  292. /package/src/game-logic/reducers/{changeCowName.ts → changeCowName.js} +0 -0
  293. /package/src/game-logic/reducers/{changeCowName.test.ts → changeCowName.test.js} +0 -0
  294. /package/src/game-logic/reducers/{clearPlot.ts → clearPlot.js} +0 -0
  295. /package/src/game-logic/reducers/{clearPlot.test.ts → clearPlot.test.js} +0 -0
  296. /package/src/game-logic/reducers/{computeCowInventoryForNextDay.ts → computeCowInventoryForNextDay.js} +0 -0
  297. /package/src/game-logic/reducers/{computeCowInventoryForNextDay.test.ts → computeCowInventoryForNextDay.test.js} +0 -0
  298. /package/src/game-logic/reducers/{computeStateForNextDay.test.ts → computeStateForNextDay.test.js} +0 -0
  299. /package/src/game-logic/reducers/{consumeIngredients.ts → consumeIngredients.js} +0 -0
  300. /package/src/game-logic/reducers/{consumeIngredients.test.ts → consumeIngredients.test.js} +0 -0
  301. /package/src/game-logic/reducers/{createPriceEvent.ts → createPriceEvent.js} +0 -0
  302. /package/src/game-logic/reducers/{createPriceEvent.test.ts → createPriceEvent.test.js} +0 -0
  303. /package/src/game-logic/reducers/{decrementItemFromInventory.ts → decrementItemFromInventory.js} +0 -0
  304. /package/src/game-logic/reducers/{decrementItemFromInventory.test.ts → decrementItemFromInventory.test.js} +0 -0
  305. /package/src/game-logic/reducers/{fertilizePlot.ts → fertilizePlot.js} +0 -0
  306. /package/src/game-logic/reducers/{fertilizePlot.test.ts → fertilizePlot.test.js} +0 -0
  307. /package/src/game-logic/reducers/{forRange.ts → forRange.js} +0 -0
  308. /package/src/game-logic/reducers/{forRange.test.ts → forRange.test.js} +0 -0
  309. /package/src/game-logic/reducers/{generatePriceEvents.ts → generatePriceEvents.js} +0 -0
  310. /package/src/game-logic/reducers/{generatePriceEvents.test.ts → generatePriceEvents.test.js} +0 -0
  311. /package/src/game-logic/reducers/{harvestPlot.ts → harvestPlot.js} +0 -0
  312. /package/src/game-logic/reducers/{harvestPlot.test.ts → harvestPlot.test.js} +0 -0
  313. /package/src/game-logic/reducers/{helpers.tsx → helpers.js} +0 -0
  314. /package/src/game-logic/reducers/{hugCow.ts → hugCow.js} +0 -0
  315. /package/src/game-logic/reducers/{hugCow.test.ts → hugCow.test.js} +0 -0
  316. /package/src/game-logic/reducers/{incrementPlotContentAge.ts → incrementPlotContentAge.js} +0 -0
  317. /package/src/game-logic/reducers/{incrementPlotContentAge.test.ts → incrementPlotContentAge.test.js} +0 -0
  318. /package/src/game-logic/reducers/{index.ts → index.js} +0 -0
  319. /package/src/game-logic/reducers/{makeFermentationRecipe.test.ts → makeFermentationRecipe.test.js} +0 -0
  320. /package/src/game-logic/reducers/{makeRecipe.ts → makeRecipe.js} +0 -0
  321. /package/src/game-logic/reducers/{makeRecipe.test.ts → makeRecipe.test.js} +0 -0
  322. /package/src/game-logic/reducers/{minePlot.test.ts → minePlot.test.js} +0 -0
  323. /package/src/game-logic/reducers/{modifyCow.ts → modifyCow.js} +0 -0
  324. /package/src/game-logic/reducers/{modifyFieldPlotAt.ts → modifyFieldPlotAt.js} +0 -0
  325. /package/src/game-logic/reducers/{offerCow.ts → offerCow.js} +0 -0
  326. /package/src/game-logic/reducers/{offerCow.test.ts → offerCow.test.js} +0 -0
  327. /package/src/game-logic/reducers/{plantInPlot.ts → plantInPlot.js} +0 -0
  328. /package/src/game-logic/reducers/{plantInPlot.test.ts → plantInPlot.test.js} +0 -0
  329. /package/src/game-logic/reducers/{prependPendingPeerMessage.ts → prependPendingPeerMessage.js} +0 -0
  330. /package/src/game-logic/reducers/{prependPendingPeerMessage.test.ts → prependPendingPeerMessage.test.js} +0 -0
  331. /package/src/game-logic/reducers/{processCellar.ts → processCellar.js} +0 -0
  332. /package/src/game-logic/reducers/{processCellar.test.ts → processCellar.test.js} +0 -0
  333. /package/src/game-logic/reducers/{processCowAttrition.ts → processCowAttrition.js} +0 -0
  334. /package/src/game-logic/reducers/{processCowAttrition.test.ts → processCowAttrition.test.js} +0 -0
  335. /package/src/game-logic/reducers/{processCowBreeding.ts → processCowBreeding.js} +0 -0
  336. /package/src/game-logic/reducers/{processCowBreeding.test.ts → processCowBreeding.test.js} +0 -0
  337. /package/src/game-logic/reducers/{processCowFertilizerProduction.test.ts → processCowFertilizerProduction.test.js} +0 -0
  338. /package/src/game-logic/reducers/{processFeedingCows.ts → processFeedingCows.js} +0 -0
  339. /package/src/game-logic/reducers/{processFeedingCows.test.ts → processFeedingCows.test.js} +0 -0
  340. /package/src/game-logic/reducers/{processField.ts → processField.js} +0 -0
  341. /package/src/game-logic/reducers/{processLevelUp.test.ts → processLevelUp.test.js} +0 -0
  342. /package/src/game-logic/reducers/{processMilkingCows.ts → processMilkingCows.js} +0 -0
  343. /package/src/game-logic/reducers/{processMilkingCows.test.ts → processMilkingCows.test.js} +0 -0
  344. /package/src/game-logic/reducers/{processNerfs.ts → processNerfs.js} +0 -0
  345. /package/src/game-logic/reducers/{processNerfs.test.ts → processNerfs.test.js} +0 -0
  346. /package/src/game-logic/reducers/{processSprinklers.ts → processSprinklers.js} +0 -0
  347. /package/src/game-logic/reducers/{processSprinklers.test.ts → processSprinklers.test.js} +0 -0
  348. /package/src/game-logic/reducers/{processWeather.ts → processWeather.js} +0 -0
  349. /package/src/game-logic/reducers/{processWeather.test.ts → processWeather.test.js} +0 -0
  350. /package/src/game-logic/reducers/{purchaseCellar.ts → purchaseCellar.js} +0 -0
  351. /package/src/game-logic/reducers/{purchaseCellar.test.ts → purchaseCellar.test.js} +0 -0
  352. /package/src/game-logic/reducers/{purchaseCombine.ts → purchaseCombine.js} +0 -0
  353. /package/src/game-logic/reducers/{purchaseCombine.test.ts → purchaseCombine.test.js} +0 -0
  354. /package/src/game-logic/reducers/{purchaseComposter.ts → purchaseComposter.js} +0 -0
  355. /package/src/game-logic/reducers/{purchaseComposter.test.ts → purchaseComposter.test.js} +0 -0
  356. /package/src/game-logic/reducers/{purchaseCow.ts → purchaseCow.js} +0 -0
  357. /package/src/game-logic/reducers/{purchaseCow.test.ts → purchaseCow.test.js} +0 -0
  358. /package/src/game-logic/reducers/{purchaseCowPen.ts → purchaseCowPen.js} +0 -0
  359. /package/src/game-logic/reducers/{purchaseCowPen.test.ts → purchaseCowPen.test.js} +0 -0
  360. /package/src/game-logic/reducers/{purchaseField.ts → purchaseField.js} +0 -0
  361. /package/src/game-logic/reducers/{purchaseForest.ts → purchaseForest.js} +0 -0
  362. /package/src/game-logic/reducers/{purchaseItem.ts → purchaseItem.js} +0 -0
  363. /package/src/game-logic/reducers/{purchaseItem.test.ts → purchaseItem.test.js} +0 -0
  364. /package/src/game-logic/reducers/{purchaseSmelter.ts → purchaseSmelter.js} +0 -0
  365. /package/src/game-logic/reducers/{purchaseSmelter.test.ts → purchaseSmelter.test.js} +0 -0
  366. /package/src/game-logic/reducers/{purchaseStorageExpansion.ts → purchaseStorageExpansion.js} +0 -0
  367. /package/src/game-logic/reducers/{purchaseStorageExpansion.test.ts → purchaseStorageExpansion.test.js} +0 -0
  368. /package/src/game-logic/reducers/{removeCowFromInventory.ts → removeCowFromInventory.js} +0 -0
  369. /package/src/game-logic/reducers/{removeFieldPlotAt.ts → removeFieldPlotAt.js} +0 -0
  370. /package/src/game-logic/reducers/{removeKegFromCellar.ts → removeKegFromCellar.js} +0 -0
  371. /package/src/game-logic/reducers/{removePeer.ts → removePeer.js} +0 -0
  372. /package/src/game-logic/reducers/{rotateNotificationLogs.test.ts → rotateNotificationLogs.test.js} +0 -0
  373. /package/src/game-logic/reducers/{selectCow.ts → selectCow.js} +0 -0
  374. /package/src/game-logic/reducers/{selectCow.test.ts → selectCow.test.js} +0 -0
  375. /package/src/game-logic/reducers/{sellCow.ts → sellCow.js} +0 -0
  376. /package/src/game-logic/reducers/{sellCow.test.ts → sellCow.test.js} +0 -0
  377. /package/src/game-logic/reducers/{sellItem.ts → sellItem.js} +0 -0
  378. /package/src/game-logic/reducers/{sellKeg.test.ts → sellKeg.test.js} +0 -0
  379. /package/src/game-logic/reducers/{setScarecrow.ts → setScarecrow.js} +0 -0
  380. /package/src/game-logic/reducers/{setScarecrow.test.ts → setScarecrow.test.js} +0 -0
  381. /package/src/game-logic/reducers/{setSprinkler.ts → setSprinkler.js} +0 -0
  382. /package/src/game-logic/reducers/{setSprinkler.test.ts → setSprinkler.test.js} +0 -0
  383. /package/src/game-logic/reducers/{showNotification.ts → showNotification.js} +0 -0
  384. /package/src/game-logic/reducers/{showNotification.test.ts → showNotification.test.js} +0 -0
  385. /package/src/game-logic/reducers/{spawnWeeds.test.ts → spawnWeeds.test.js} +0 -0
  386. /package/src/game-logic/reducers/{unlockTool.ts → unlockTool.js} +0 -0
  387. /package/src/game-logic/reducers/{unlockTool.test.ts → unlockTool.test.js} +0 -0
  388. /package/src/game-logic/reducers/{updateAchievements.test.ts → updateAchievements.test.js} +0 -0
  389. /package/src/game-logic/reducers/{updateFinancialRecords.ts → updateFinancialRecords.js} +0 -0
  390. /package/src/game-logic/reducers/{updateFinancialRecords.test.ts → updateFinancialRecords.test.js} +0 -0
  391. /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.ts → updateInventoryRecordsForNextDay.js} +0 -0
  392. /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.test.ts → updateInventoryRecordsForNextDay.test.js} +0 -0
  393. /package/src/game-logic/reducers/{updateLearnedRecipes.ts → updateLearnedRecipes.js} +0 -0
  394. /package/src/game-logic/reducers/{updateLearnedRecipes.test.ts → updateLearnedRecipes.test.js} +0 -0
  395. /package/src/game-logic/reducers/{updatePlotShoveledState.ts → updatePlotShoveledState.js} +0 -0
  396. /package/src/game-logic/reducers/{updatePriceEvents.tsx → updatePriceEvents.js} +0 -0
  397. /package/src/game-logic/reducers/{updatePriceEvents.test.ts → updatePriceEvents.test.js} +0 -0
  398. /package/src/game-logic/reducers/{upgradeTool.ts → upgradeTool.js} +0 -0
  399. /package/src/game-logic/reducers/{upgradeTool.test.ts → upgradeTool.test.js} +0 -0
  400. /package/src/game-logic/reducers/{waterAllPlots.ts → waterAllPlots.js} +0 -0
  401. /package/src/game-logic/reducers/{waterAllPlots.test.ts → waterAllPlots.test.js} +0 -0
  402. /package/src/game-logic/reducers/{waterField.ts → waterField.js} +0 -0
  403. /package/src/game-logic/reducers/{waterPlot.ts → waterPlot.js} +0 -0
  404. /package/src/game-logic/reducers/{waterPlot.test.ts → waterPlot.test.js} +0 -0
  405. /package/src/game-logic/reducers/{withdrawCow.ts → withdrawCow.js} +0 -0
  406. /package/src/game-logic/reducers/{withdrawCow.test.ts → withdrawCow.test.js} +0 -0
  407. /package/src/img/__mocks__/{index.ts → index.js} +0 -0
  408. /package/src/img/{index.ts → index.js} +0 -0
  409. /package/src/interfaces/{Factory.ts → Factory.js} +0 -0
  410. /package/src/{mui-theme.ts → mui-theme.js} +0 -0
  411. /package/src/{polyfills.ts → polyfills.js} +0 -0
  412. /package/src/services/{cellar.ts → cellar.js} +0 -0
  413. /package/src/services/{wine.test.ts → wine.test.js} +0 -0
  414. /package/src/{setupTests.ts → setupTests.js} +0 -0
  415. /package/src/shell/{bootup.test.ts → bootup.test.js} +0 -0
  416. /package/src/shell/{field.test.ts → field.test.js} +0 -0
  417. /package/src/shell/{game-saving.test.ts → game-saving.test.js} +0 -0
  418. /package/src/shell/{navigation.test.ts → navigation.test.js} +0 -0
  419. /package/src/shell/{pending-notifications.test.ts → pending-notifications.test.js} +0 -0
  420. /package/src/{strings.ts → strings.js} +0 -0
  421. /package/src/test-utils/stubs/{cowStub.ts → cowStub.js} +0 -0
  422. /package/src/test-utils/stubs/{farmhandStub.tsx → farmhandStub.js} +0 -0
  423. /package/src/test-utils/stubs/{itemStub.ts → itemStub.js} +0 -0
  424. /package/src/test-utils/stubs/{peerMetadataStub.ts → peerMetadataStub.js} +0 -0
  425. /package/src/test-utils/stubs/{saveDataStubFactory.ts → saveDataStubFactory.js} +0 -0
  426. /package/src/test-utils/{ui.ts → ui.js} +0 -0
  427. /package/src/utils/__snapshots__/{index.test.ts.snap → index.test.js.snap} +0 -0
  428. /package/src/utils/{findInField.ts → findInField.js} +0 -0
  429. /package/src/utils/{findInField.test.ts → findInField.test.js} +0 -0
  430. /package/src/utils/{getCropLifecycleDuration.test.ts → getCropLifecycleDuration.test.js} +0 -0
  431. /package/src/utils/{getCropsAvailableToFerment.test.ts → getCropsAvailableToFerment.test.js} +0 -0
  432. /package/src/utils/{getItemBaseValue.ts → getItemBaseValue.js} +0 -0
  433. /package/src/utils/{getKegSpoilageRate.ts → getKegSpoilageRate.js} +0 -0
  434. /package/src/utils/{getKegSpoilageRate.test.ts → getKegSpoilageRate.test.js} +0 -0
  435. /package/src/utils/{getKegValue.ts → getKegValue.js} +0 -0
  436. /package/src/utils/{getKegValue.test.ts → getKegValue.test.js} +0 -0
  437. /package/src/utils/{getLevelEntitlements.test.ts → getLevelEntitlements.test.js} +0 -0
  438. /package/src/utils/{getMaxYieldOfFermentationRecipe.test.ts → getMaxYieldOfFermentationRecipe.test.js} +0 -0
  439. /package/src/utils/{getSaltRequirementsForFermentationRecipe.ts → getSaltRequirementsForFermentationRecipe.js} +0 -0
  440. /package/src/utils/{getWineVarietiesAvailableToMake.test.ts → getWineVarietiesAvailableToMake.test.js} +0 -0
  441. /package/src/utils/{getYeastRequiredForWine.ts → getYeastRequiredForWine.js} +0 -0
  442. /package/src/utils/{isItemAGrownCrop.ts → isItemAGrownCrop.js} +0 -0
  443. /package/src/utils/{levelAchieved.ts → levelAchieved.js} +0 -0
  444. /package/src/utils/{moneyString.ts → moneyString.js} +0 -0
  445. /package/src/utils/{moneyString.test.ts → moneyString.test.js} +0 -0
  446. /package/src/utils/{noop.ts → noop.js} +0 -0
  447. /package/src/utils/{totalIngredientsInRecipe.test.ts → totalIngredientsInRecipe.test.js} +0 -0
@@ -200,7 +200,6 @@ export const LEVEL_GAINED_NOTIFICATION = (_, newLevel, randomCropSeed) => {
200
200
  itemsMap[itemUnlockLevels[newLevel]].name
201
201
  }**.`
202
202
  )
203
- // @ts-expect-error
204
203
  } else if (levelObject && levelObject.increasesSprinklerRange) {
205
204
  chunks.push(`Sprinkler range has increased.`)
206
205
  } else if (randomCropSeed) {
@@ -209,15 +208,11 @@ export const LEVEL_GAINED_NOTIFICATION = (_, newLevel, randomCropSeed) => {
209
208
  randomCropSeed.name
210
209
  }** as a reward!`
211
210
  )
212
- // @ts-expect-error
213
211
  } else if (levelObject && levelObject.unlocksTool) {
214
- // @ts-expect-error
215
212
  if (levelObject.unlocksTool === toolType.SHOVEL) {
216
213
  chunks.push(SHOVEL_UNLOCKED)
217
214
  }
218
- // @ts-expect-error
219
215
  } else if (levelObject && levelObject.unlocksStageFocusType) {
220
- // @ts-expect-error
221
216
  if (levelObject.unlocksStageFocusType === stageFocusType.FOREST) {
222
217
  chunks.push(FOREST_AVAILABLE_NOTIFICATION)
223
218
  }
@@ -245,7 +240,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
245
240
  const positionKeys = Object.keys(positions)
246
241
 
247
242
  positionKeys.forEach(itemId =>
248
- // @ts-expect-error
249
243
  (positions[itemId] > 0 ? positivePositions : negativePositions).push(itemId)
250
244
  )
251
245
 
@@ -254,7 +248,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
254
248
  if (positivePositions.length) {
255
249
  chunks.push('Values raised:')
256
250
  positivePositions.forEach(itemId =>
257
- // @ts-expect-error
258
251
  chunks.push(` - ${itemsMap[itemId].name}`)
259
252
  )
260
253
  }
@@ -266,7 +259,6 @@ export const POSITIONS_POSTED_NOTIFICATION = (_, who, positions) => {
266
259
 
267
260
  chunks.push('Values lowered:')
268
261
  negativePositions.forEach(itemId =>
269
- // @ts-expect-error
270
262
  chunks.push(` - ${itemsMap[itemId].name}`)
271
263
  )
272
264
  }
@@ -40,7 +40,7 @@ export const testShoveledPlot = plotProps => ({
40
40
  export const testItem = (item = {}) => ({
41
41
  id: '',
42
42
  name: '',
43
- type: /** @type {farmhand.itemType} */ 'CRAFTED_ITEM',
43
+ type: /** @type {farmhand.itemType} */ ('CRAFTED_ITEM'),
44
44
  value: 0,
45
45
  description: '',
46
46
  doesPriceFluctuate: false,
@@ -62,8 +62,8 @@ export const testRecipe = (overrides = {}) => ({
62
62
  'sample-item-1': 1,
63
63
  },
64
64
  condition: () => true,
65
- recipeType: /** @type {farmhand.recipeType} */ 'KITCHEN',
66
- type: /** @type {farmhand.itemType} */ 'CRAFTED_ITEM',
65
+ recipeType: /** @type {farmhand.recipeType} */ ('KITCHEN'),
66
+ type: /** @type {farmhand.itemType} */ ('CRAFTED_ITEM'),
67
67
  value: 100,
68
68
  ...overrides,
69
69
  })
@@ -12,7 +12,6 @@ export const getKegStub = (overrides = {}) => {
12
12
  return {
13
13
  id: uuid(),
14
14
  itemId: carrot.id,
15
- // @ts-expect-error
16
15
  daysUntilMature: carrot.daysToFerment ?? 0,
17
16
  ...overrides,
18
17
  }
@@ -3,7 +3,6 @@ import { itemsMap } from '../data/maps.js'
3
3
  import { memoize } from './memoize.js'
4
4
  import { isItemAFarmProduct } from './isItemAFarmProduct.js'
5
5
 
6
- // @ts-expect-error
7
6
  export const farmProductsSold = memoize(
8
7
  /**
9
8
  * @param {Partial<Record<string, number>>} itemsSold
@@ -12,7 +11,6 @@ export const farmProductsSold = memoize(
12
11
  itemsSold =>
13
12
  Object.entries(itemsSold).reduce(
14
13
  (sum, [itemId, numberSold]) =>
15
- // @ts-expect-error
16
14
  sum + (isItemAFarmProduct(itemsMap[itemId]) ? numberSold || 0 : 0),
17
15
  0
18
16
  )
@@ -4,7 +4,6 @@ import { memoize } from './memoize.js'
4
4
  * @param {{ cropTimeline: number[] }} crop
5
5
  * @returns {number}
6
6
  */
7
- // @ts-expect-error
8
7
  export const getCropLifecycleDuration = memoize(({ cropTimeline }) => {
9
8
  return cropTimeline.reduce((acc, value) => {
10
9
  return acc + value
@@ -25,7 +25,6 @@ export function getCropsAvailableToFerment(levelEntitlements) {
25
25
  finalCropItemFromSeedItem &&
26
26
  Number.isFinite(finalCropItemFromSeedItem.daysToFerment)
27
27
  ) {
28
- // @ts-expect-error
29
28
  acc.push(finalCropItemFromSeedItem)
30
29
  }
31
30
 
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { memoize } from './memoize.js'
5
5
 
6
- // @ts-expect-error
7
6
  export const getInventoryQuantityMap = memoize(
8
7
  /**
9
8
  * @param {{ id: item['id'], quantity: number }[]} inventory
@@ -9,7 +9,6 @@ import { memoize } from './memoize.js'
9
9
  * @returns {levelEntitlements} Contains `sprinklerRange` and keys that correspond to
10
10
  * unlocked items.
11
11
  */
12
- // @ts-expect-error
13
12
  export const getLevelEntitlements = memoize(
14
13
  /**
15
14
  * @param {number} levelNumber
@@ -38,17 +37,14 @@ export const getLevelEntitlements = memoize(
38
37
  }
39
38
 
40
39
  if (unlocksShopItem) {
41
- // @ts-expect-error
42
40
  acc.items[unlocksShopItem] = true
43
41
  }
44
42
 
45
43
  if (unlocksTool) {
46
- // @ts-expect-error
47
44
  acc.tools[unlocksTool] = true
48
45
  }
49
46
 
50
47
  if (unlocksStageFocusType) {
51
- // @ts-expect-error
52
48
  acc.stageFocusType[unlocksStageFocusType] = true
53
49
  }
54
50
 
@@ -22,7 +22,6 @@ export const getMaxYieldOfFermentationRecipe = (
22
22
  ) => {
23
23
  const {
24
24
  [fermentationRecipe.id]: itemQuantityInInventory = 0,
25
- // @ts-expect-error
26
25
  [itemsMap.salt.id]: saltQuantityInInventory = 0,
27
26
  } = getInventoryQuantityMap(inventory)
28
27
 
@@ -18,9 +18,7 @@ const getGrapesSold = itemsSold => {
18
18
  ) => {
19
19
  const item = itemsMap[itemId]
20
20
 
21
- // @ts-expect-error
22
21
  if ((quantity || 0) > 0 && isGrape(item)) {
23
- // @ts-expect-error
24
22
  acc.push(item)
25
23
  }
26
24
 
@@ -289,7 +289,6 @@ export const getPlotContentType = ({ itemId }) =>
289
289
  export const doesPlotContainCrop = plot =>
290
290
  plot !== null && getPlotContentType(plot) === itemType.CROP
291
291
 
292
- // @ts-expect-error
293
292
  export const getLifeStageRange = memoize((
294
293
  /** @type {number[]} */ cropTimeline
295
294
  ) => {
@@ -331,9 +330,7 @@ export const getGrowingPhase = memoize(
331
330
  },
332
331
  {
333
332
  cacheSize:
334
- // @ts-expect-error
335
333
  LARGEST_PURCHASABLE_FIELD_SIZE.columns *
336
- // @ts-expect-error
337
334
  LARGEST_PURCHASABLE_FIELD_SIZE.rows,
338
335
  }
339
336
  )
@@ -389,7 +386,7 @@ export const getPlotImage = (plotContents, x, y) => {
389
386
  }
390
387
 
391
388
  // Handle other plot content (non-crop, non-weed)
392
- return itemImages[/** @type {farmhand.plotContent} */ plotContents.itemId]
389
+ return itemImages[/** @type {farmhand.plotContent} */ (plotContents).itemId]
393
390
  }
394
391
 
395
392
  if (isShoveledPlot(plotContents)) {
@@ -451,14 +448,12 @@ export const getFinalCropItemIdFromSeedItemId = (
451
448
 
452
449
  export const getSeedItemIdFromFinalStageCropItemId = memoize(
453
450
  /** @type {string} */ cropItemId => {
454
- // @ts-expect-error
455
451
  const seedItemId = Object.values(itemsMap).find(({ growsInto }) => {
456
452
  if (Array.isArray(growsInto)) {
457
453
  return growsInto.includes(cropItemId)
458
454
  } else {
459
455
  return growsInto === cropItemId
460
456
  }
461
- // @ts-expect-error
462
457
  })?.id
463
458
 
464
459
  if (!seedItemId)
@@ -498,11 +493,8 @@ export const getCowDisplayName = (cow, playerId, allowCustomPeerCowNames) => {
498
493
  * @returns {farmhand.cow}
499
494
  */
500
495
  export const generateCow = (options = {}) => {
501
- // @ts-expect-error
502
496
  const gender = options.gender || chooseRandom(Object.values(genders))
503
- // @ts-expect-error
504
497
  const color = options.color || chooseRandom(Object.values(standardCowColors))
505
- // @ts-expect-error
506
498
  const id = options.id || uuid()
507
499
 
508
500
  const baseWeight = Math.round(
@@ -567,7 +559,7 @@ export const generateOffspringCow = (cow1, cow2, ownerId, customProps = {}) => {
567
559
  }
568
560
 
569
561
  delete colorsInBloodline[
570
- /** @type {keyof typeof colorsInBloodline} */ cowColors.RAINBOW
562
+ /** @type {keyof typeof colorsInBloodline} */ (cowColors.RAINBOW)
571
563
  ]
572
564
 
573
565
  const isRainbowCow =
@@ -682,7 +674,6 @@ export const getCowSellValue = cow => getCowValue(cow, true)
682
674
  * @param {{id: string, quantity: number}[]} inventory
683
675
  * @returns {number}
684
676
  */
685
- // @ts-expect-error
686
677
  export const maxYieldOfRecipe = memoize(({ ingredients }, inventory) => {
687
678
  const inventoryQuantityMap = getInventoryQuantityMap(inventory)
688
679
 
@@ -750,7 +741,6 @@ export const doesMenuObstructStage = () => window.innerWidth < BREAKPOINTS.MD
750
741
  /** @type {Set<farmhand.itemType>} */
751
742
  const itemTypesToShowInReverse = new Set([itemType.MILK])
752
743
 
753
- // @ts-expect-error
754
744
  const sortItemIdsByTypeAndValue = memoize(itemIds =>
755
745
  sortBy(itemIds, [
756
746
  id => Number(itemsMap[id].type !== itemType.CROP),
@@ -772,7 +762,6 @@ export const sortItems = items => {
772
762
  return sortItemIdsByTypeAndValue(items.map(({ id }) => id)).map(id => map[id])
773
763
  }
774
764
 
775
- // @ts-expect-error
776
765
  export const inventorySpaceConsumed = memoize(
777
766
  /**
778
767
  * @param {farmhand.state['inventory']} inventory
@@ -797,7 +786,6 @@ export const inventorySpaceRemaining = ({ inventory, inventoryLimit }) =>
797
786
  export const doesInventorySpaceRemain = state =>
798
787
  inventorySpaceRemaining(state) > 0
799
788
 
800
- // @ts-expect-error
801
789
  export const areHuggingMachinesInInventory = memoize(
802
790
  /**
803
791
  * @param {farmhand.state['inventory']} inventory
@@ -817,7 +805,6 @@ export const nullArray = memoize(
817
805
  }
818
806
  )
819
807
 
820
- // @ts-expect-error
821
808
  export const findCowById = memoize(
822
809
  /**
823
810
  * @param {Array.<farmhand.cow>} cowInventory
@@ -834,7 +821,6 @@ export const findCowById = memoize(
834
821
  export const experienceNeededForLevel = targetLevel =>
835
822
  ((targetLevel - 1) * 10) ** 2
836
823
 
837
- // @ts-expect-error
838
824
  export const getAvailableShopInventory = memoize((
839
825
  /** @type {farmhand.levelEntitlements} */ levelEntitlements
840
826
  ) =>
@@ -879,7 +865,7 @@ export const getPeerMetadata = state => {
879
865
 
880
866
  return acc
881
867
  },
882
- /** @type {Partial<farmhand.peerMetadata>} */ {}
868
+ /** @type {Partial<farmhand.peerMetadata>} */ ({})
883
869
  )
884
870
 
885
871
  Object.assign(reducedState, {
@@ -888,7 +874,7 @@ export const getPeerMetadata = state => {
888
874
  ),
889
875
  })
890
876
 
891
- return /** @type {farmhand.peerMetadata} */ reducedState
877
+ return /** @type {farmhand.peerMetadata} */ (reducedState)
892
878
  }
893
879
 
894
880
  /**
@@ -897,7 +883,7 @@ export const getPeerMetadata = state => {
897
883
  * farmhand.state data that should be persisted.
898
884
  */
899
885
  export const reduceByPersistedKeys = state =>
900
- /** @type {farmhand.state} */ PERSISTED_STATE_KEYS.reduce((
886
+ /** @type {farmhand.state} */ (PERSISTED_STATE_KEYS.reduce((
901
887
  /** @type {Partial<farmhand.state>} */ acc,
902
888
  key
903
889
  ) => {
@@ -908,7 +894,7 @@ export const reduceByPersistedKeys = state =>
908
894
  }
909
895
 
910
896
  return acc
911
- }, {})
897
+ }, {}))
912
898
 
913
899
  /**
914
900
  * @param {Array.<number>} historicalData Must be no longer than 7 numbers long.
@@ -1006,7 +992,8 @@ export const transformStateDataForImport = /** @type {(state: any) => farmhand.s
1006
992
  ) {
1007
993
  sanitizedState = {
1008
994
  ...sanitizedState,
1009
- stageFocus: /** @type {farmhand.stageFocusType} */ STANDARD_VIEW_LIST[0],
995
+ stageFocus:
996
+ /** @type {farmhand.stageFocusType} */ (STANDARD_VIEW_LIST[0]),
1010
997
  }
1011
998
  }
1012
999
 
@@ -1048,15 +1035,17 @@ export const transformStateDataForImport = /** @type {(state: any) => farmhand.s
1048
1035
  }
1049
1036
 
1050
1037
  // NOTE: Legacy data trasformation for https://github.com/jeremyckahn/farmhand/issues/387
1038
+ // @ts-expect-error
1051
1039
  if (sanitizedState.id) {
1040
+ // @ts-expect-error
1052
1041
  sanitizedState.playerId = sanitizedState.id
1042
+ // @ts-expect-error
1053
1043
  delete sanitizedState.id
1054
1044
  }
1055
1045
 
1056
1046
  return sanitizedState
1057
1047
  }
1058
1048
 
1059
- // @ts-expect-error
1060
1049
  export const getPlayerName = memoize(
1061
1050
  /**
1062
1051
  * @param {string} playerId
@@ -1124,11 +1113,9 @@ export function randomChoice(weightedOptions) {
1124
1113
 
1125
1114
  for (let option of weightedOptions) {
1126
1115
  totalWeight += option.weight
1127
- // @ts-expect-error
1128
1116
  sortedOptions.push(option)
1129
1117
  }
1130
1118
 
1131
- // @ts-expect-error
1132
1119
  sortedOptions.sort(o => o.weight)
1133
1120
 
1134
1121
  let diceRoll = random() * totalWeight
@@ -1159,7 +1146,6 @@ const colorizeCowTemplate = (() => {
1159
1146
  const cachedCowImages = {}
1160
1147
 
1161
1148
  // https://stackoverflow.com/a/5624139
1162
- // @ts-expect-error
1163
1149
  const hexToRgb = memoize(hex => {
1164
1150
  const [, r, g, b] = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(
1165
1151
  hex
@@ -729,6 +729,7 @@ describe('canMakeRecipe', () => {
729
729
  test('evaluates inventory correctly', () => {
730
730
  expect(
731
731
  canMakeRecipe(
732
+ // @ts-expect-error
732
733
  { ingredients: { 'sample-item-1': 2 } },
733
734
  [{ id: 'sample-item-1', quantity: 1 }],
734
735
  1
@@ -741,6 +742,7 @@ describe('canMakeRecipe', () => {
741
742
  test('evaluates inventory correctly', () => {
742
743
  expect(
743
744
  canMakeRecipe(
745
+ // @ts-expect-error
744
746
  { ingredients: { 'sample-item-1': 2 } },
745
747
  [{ id: 'sample-item-1', quantity: 2 }],
746
748
  1
@@ -17,5 +17,5 @@ const FARM_PRODUCT_TYPES = [
17
17
  export const isItemAFarmProduct = item =>
18
18
  Boolean(
19
19
  isItemAGrownCrop(item) ||
20
- FARM_PRODUCT_TYPES.includes(/** @type {any} */ item.type)
20
+ FARM_PRODUCT_TYPES.includes(/** @type {any} */ (item.type))
21
21
  )
@@ -21,7 +21,6 @@ export class MemoizeCache {
21
21
  * @see https://github.com/caiogondim/fast-memoize.js
22
22
  */
23
23
  constructor({ cacheSize = MEMOIZE_CACHE_CLEAR_THRESHOLD } = {}) {
24
- // @ts-expect-error
25
24
  this.cacheSize = cacheSize
26
25
  }
27
26
 
@@ -34,7 +33,6 @@ export class MemoizeCache {
34
33
  }
35
34
 
36
35
  set(key, value) {
37
- // @ts-expect-error
38
36
  if (Object.keys(this.cache).length > this.cacheSize) {
39
37
  this.cache = {}
40
38
  }
@@ -1,9 +1,7 @@
1
1
  export function totalIngredientsInRecipe(recipe, amount = 1) {
2
2
  return (
3
3
  amount *
4
- // @ts-expect-error
5
4
  Object.values(recipe.ingredients).reduce(
6
- // @ts-expect-error
7
5
  (acc, quantity) => acc + quantity,
8
6
  0
9
7
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes