@jeremyckahn/farmhand 1.19.19 → 1.19.21
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.
- package/dist/assets/{index-BxA2fVaN.js → index-CG_lY1MJ.js} +9 -9
- package/dist/assets/{index-BxA2fVaN.js.map → index-CG_lY1MJ.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.map +1 -1
- package/package.json +3 -2
- package/src/common/services/{randomNumber.js → randomNumber.ts} +1 -0
- package/src/common/{utils.js → utils.ts} +1 -1
- package/src/components/AccountingView/{AccountingView.js → AccountingView.tsx} +1 -0
- package/src/components/AchievementsView/{AchievementsView.js → AchievementsView.tsx} +6 -4
- package/src/components/AnimatedNumber/{AnimatedNumber.js → AnimatedNumber.tsx} +9 -6
- package/src/components/AppBar/{AppBar.js → AppBar.tsx} +5 -2
- package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.js → BailOutErrorBoundary.tsx} +2 -0
- package/src/components/Cellar/{CellarInventoryTabPanel.js → CellarInventoryTabPanel.tsx} +2 -0
- package/src/components/Cellar/{Keg.js → Keg.tsx} +0 -1
- package/src/components/ContextPane/{ContextPane.test.js → ContextPane.test.tsx} +3 -0
- package/src/components/ContextPane/{ContextPane.js → ContextPane.tsx} +2 -0
- package/src/components/CowCard/Bloodline/{Bloodline.test.js → Bloodline.test.tsx} +6 -3
- package/src/components/CowCard/{CowCard.js → CowCard.tsx} +6 -4
- package/src/components/CowCard/Subheader/{Subheader.js → Subheader.tsx} +1 -0
- package/src/components/CowPen/{Cow.js → Cow.tsx} +27 -13
- package/src/components/CowPen/{CowPen.test.js → CowPen.test.tsx} +15 -1
- package/src/components/CowPen/{Tumbleweeds.js → Tumbleweeds.tsx} +2 -1
- package/src/components/Farmhand/{Farmhand.context.js → Farmhand.context.tsx} +2 -2
- package/src/components/Farmhand/{Farmhand.js → Farmhand.tsx} +91 -24
- package/src/components/FermentationRecipeList/{FermentationRecipe.js → FermentationRecipe.tsx} +4 -3
- package/src/components/FermentationRecipeList/{FermentationRecipeList.test.js → FermentationRecipeList.test.tsx} +5 -0
- package/src/components/FermentationRecipeList/{FermentationRecipeList.js → FermentationRecipeList.tsx} +3 -0
- package/src/components/Field/{Field.test.js → Field.test.tsx} +2 -3
- package/src/components/Field/{Field.js → Field.tsx} +23 -18
- package/src/components/Home/{Home.js → Home.tsx} +1 -0
- package/src/components/Home/{SnowBackground.js → SnowBackground.tsx} +2 -0
- package/src/components/Inventory/{Inventory.js → Inventory.tsx} +33 -25
- package/src/components/Item/{Item.js → Item.tsx} +2 -1
- package/src/components/LogView/{LogView.js → LogView.tsx} +23 -18
- package/src/components/Navigation/{Navigation.js → Navigation.tsx} +5 -6
- package/src/components/NotificationSystem/{NotificationSystem.js → NotificationSystem.tsx} +0 -1
- package/src/components/OnlinePeersView/{OnlinePeersView.js → OnlinePeersView.tsx} +7 -4
- package/src/components/Plot/{Plot.test.js → Plot.test.tsx} +8 -8
- package/src/components/Plot/{Plot.js → Plot.tsx} +5 -0
- package/src/components/PriceEventView/{PriceEventView.test.js → PriceEventView.test.tsx} +1 -0
- package/src/components/ProgressBar/{ProgressBar.js → ProgressBar.tsx} +2 -0
- package/src/components/QuantityInput/{QuantityInput.js → QuantityInput.tsx} +1 -0
- package/src/components/Recipe/{Recipe.js → Recipe.tsx} +1 -2
- package/src/components/SettingsView/{RandomSeedInput.js → RandomSeedInput.tsx} +1 -1
- package/src/components/Shop/{Shop.js → Shop.tsx} +2 -1
- package/src/components/Stage/{Stage.test.js → Stage.test.tsx} +1 -0
- package/src/components/Stage/{Stage.js → Stage.tsx} +6 -3
- package/src/components/TierPurchase/{TierPurchase.js → TierPurchase.tsx} +3 -3
- package/src/components/Toolbelt/{Toolbelt.js → Toolbelt.tsx} +3 -0
- package/src/components/UpgradePurchase/{UpgradePurchase.js → UpgradePurchase.tsx} +0 -1
- package/src/components/WineRecipeList/{WineRecipe.test.js → WineRecipe.test.tsx} +10 -1
- package/src/components/WineRecipeList/{WineRecipe.js → WineRecipe.tsx} +2 -1
- package/src/components/WineRecipeList/{WineRecipeList.js → WineRecipeList.tsx} +1 -0
- package/src/components/Workshop/{ForgeTabPanel.js → ForgeTabPanel.tsx} +1 -0
- package/src/components/Workshop/{Workshop.test.js → Workshop.test.tsx} +2 -2
- package/src/components/Workshop/{getUpgradesAvailable.test.js → getUpgradesAvailable.test.ts} +1 -0
- package/src/components/Workshop/{getUpgradesAvailable.js → getUpgradesAvailable.ts} +2 -0
- package/src/{constants.js → constants.ts} +2 -2
- package/src/data/{achievements.test.js → achievements.test.ts} +2 -1
- package/src/data/{achievements.js → achievements.ts} +9 -0
- package/src/data/{crop.js → crop.ts} +5 -4
- package/src/data/crops/{asparagus.js → asparagus.ts} +2 -0
- package/src/data/crops/{carrot.js → carrot.ts} +2 -0
- package/src/data/crops/{corn.js → corn.ts} +2 -0
- package/src/data/crops/{garlic.js → garlic.ts} +2 -0
- package/src/data/crops/{grape.js → grape.ts} +11 -7
- package/src/data/crops/{jalapeno.js → jalapeno.ts} +2 -0
- package/src/data/crops/{olive.js → olive.ts} +2 -0
- package/src/data/crops/{onion.js → onion.ts} +2 -0
- package/src/data/crops/{pea.js → pea.ts} +2 -0
- package/src/data/crops/{potato.js → potato.ts} +2 -0
- package/src/data/crops/{pumpkin.js → pumpkin.ts} +2 -0
- package/src/data/crops/{soybean.js → soybean.ts} +2 -0
- package/src/data/crops/{spinach.js → spinach.ts} +2 -0
- package/src/data/crops/{strawberry.js → strawberry.ts} +2 -0
- package/src/data/crops/{sunflower.js → sunflower.ts} +2 -0
- package/src/data/crops/{sweet-potato.js → sweet-potato.ts} +2 -0
- package/src/data/crops/{tomato.js → tomato.ts} +2 -0
- package/src/data/crops/{watermelon.js → watermelon.ts} +2 -0
- package/src/data/crops/{wheat.js → wheat.ts} +2 -0
- package/src/data/{items.js → items.ts} +12 -12
- package/src/data/{levels.js → levels.ts} +28 -0
- package/src/data/{maps.js → maps.ts} +2 -1
- package/src/data/ores/{bronzeOre.js → bronzeOre.ts} +1 -1
- package/src/data/ores/{coal.js → coal.ts} +1 -1
- package/src/data/ores/{goldOre.js → goldOre.ts} +1 -1
- package/src/data/ores/{ironOre.js → ironOre.ts} +1 -1
- package/src/data/ores/{saltRock.js → saltRock.ts} +1 -1
- package/src/data/ores/{silverOre.js → silverOre.ts} +1 -1
- package/src/data/ores/{stone.js → stone.ts} +1 -1
- package/src/data/{recipes.js → recipes.ts} +43 -43
- package/src/data/{upgrades.js → upgrades.ts} +4 -4
- package/src/{enums.js → enums.ts} +28 -28
- package/src/factories/{CoalFactory.js → CoalFactory.ts} +2 -0
- package/src/factories/{OreFactory.js → OreFactory.ts} +3 -0
- package/src/factories/{ResourceFactory.test.js → ResourceFactory.test.ts} +4 -0
- package/src/factories/{ResourceFactory.js → ResourceFactory.ts} +4 -0
- package/src/factories/{StoneFactory.js → StoneFactory.ts} +1 -0
- package/src/{fetch-utils.js → fetch-utils.ts} +2 -0
- package/src/game-logic/{field-purchase.test.js → field-purchase.test.ts} +4 -2
- package/src/game-logic/reducers/{applyCrows.js → applyCrows.ts} +3 -0
- package/src/game-logic/reducers/{applyLoanInterest.js → applyLoanInterest.ts} +1 -1
- package/src/game-logic/reducers/{applyPrecipitation.js → applyPrecipitation.ts} +6 -6
- package/src/game-logic/reducers/{changeCowAutomaticHugState.js → changeCowAutomaticHugState.ts} +2 -2
- package/src/game-logic/reducers/{computeStateForNextDay.js → computeStateForNextDay.ts} +2 -2
- package/src/game-logic/reducers/{consumeIngredients.js → consumeIngredients.ts} +2 -2
- package/src/game-logic/reducers/{harvestPlot.js → harvestPlot.ts} +4 -4
- package/src/game-logic/reducers/{makeFermentationRecipe.js → makeFermentationRecipe.ts} +1 -0
- package/src/game-logic/reducers/{makeRecipe.test.js → makeRecipe.test.ts} +11 -8
- package/src/game-logic/reducers/{makeWine.test.js → makeWine.test.ts} +0 -2
- package/src/game-logic/reducers/{makeWine.js → makeWine.ts} +1 -0
- package/src/game-logic/reducers/{minePlot.js → minePlot.ts} +1 -0
- package/src/game-logic/reducers/{processCellarSpoilage.test.js → processCellarSpoilage.test.ts} +0 -5
- package/src/game-logic/reducers/{processCellarSpoilage.js → processCellarSpoilage.ts} +0 -1
- package/src/game-logic/reducers/{processCowFertilizerProduction.js → processCowFertilizerProduction.ts} +1 -1
- package/src/game-logic/reducers/{processLevelUp.js → processLevelUp.ts} +3 -0
- package/src/game-logic/reducers/{purchaseField.test.js → purchaseField.test.ts} +2 -0
- package/src/game-logic/reducers/{purchaseField.js → purchaseField.ts} +3 -2
- package/src/game-logic/reducers/{purchaseForest.test.js → purchaseForest.test.tsx} +6 -2
- package/src/game-logic/reducers/{purchaseForest.js → purchaseForest.ts} +3 -2
- package/src/game-logic/reducers/{rotateNotificationLogs.js → rotateNotificationLogs.ts} +1 -1
- package/src/game-logic/reducers/{sellCow.test.js → sellCow.test.ts} +3 -3
- package/src/game-logic/reducers/{sellItem.test.js → sellItem.test.ts} +0 -3
- package/src/game-logic/reducers/{sellKeg.js → sellKeg.ts} +0 -1
- package/src/game-logic/reducers/{spawnWeeds.js → spawnWeeds.ts} +1 -0
- package/src/game-logic/reducers/{updateAchievements.js → updateAchievements.ts} +10 -9
- package/src/game-logic/reducers/{updatePeer.test.js → updatePeer.test.ts} +0 -4
- package/src/game-logic/reducers/{updatePeer.js → updatePeer.ts} +1 -0
- package/src/game-logic/reducers/{updatePlotShoveledState.test.js → updatePlotShoveledState.test.ts} +0 -1
- package/src/handlers/{peer-events.js → peer-events.ts} +9 -3
- package/src/handlers/{ui-events.test.js → ui-events.test.ts} +2 -0
- package/src/handlers/{ui-events.js → ui-events.tsx} +107 -25
- package/src/{index.js → index.tsx} +2 -0
- package/src/scripts/{generate-crop-table.js → generate-crop-table.ts} +5 -4
- package/src/services/{cellar.test.js → cellar.test.ts} +1 -1
- package/src/services/{wine.js → wine.ts} +1 -0
- package/src/shell/{notifications.test.js → notifications.test.ts} +19 -13
- package/src/{templates.js → templates.ts} +8 -0
- package/src/test-utils/{index.js → index.ts} +3 -3
- package/src/test-utils/stubs/{getKegStub.js → getKegStub.ts} +1 -0
- package/src/utils/{farmProductsSold.js → farmProductsSold.tsx} +2 -0
- package/src/utils/{getCropLifecycleDuration.js → getCropLifecycleDuration.ts} +1 -0
- package/src/utils/{getCropsAvailableToFerment.js → getCropsAvailableToFerment.ts} +1 -0
- package/src/utils/{getInventoryQuantityMap.js → getInventoryQuantityMap.ts} +1 -0
- package/src/utils/{getLevelEntitlements.js → getLevelEntitlements.ts} +4 -0
- package/src/utils/{getMaxYieldOfFermentationRecipe.js → getMaxYieldOfFermentationRecipe.ts} +1 -0
- package/src/utils/{getWineVarietiesAvailableToMake.js → getWineVarietiesAvailableToMake.ts} +2 -0
- package/src/utils/{index.test.js → index.test.ts} +0 -2
- package/src/utils/{index.js → index.tsx} +31 -18
- package/src/utils/{isItemAFarmProduct.js → isItemAFarmProduct.ts} +1 -1
- package/src/utils/{memoize.js → memoize.ts} +2 -0
- package/src/utils/{totalIngredientsInRecipe.js → totalIngredientsInRecipe.ts} +2 -0
- /package/src/common/{constants.js → constants.ts} +0 -0
- /package/src/common/services/{randomNumber.test.js → randomNumber.test.ts} +0 -0
- /package/src/common/{utils.test.js → utils.test.ts} +0 -0
- /package/src/components/AccountingView/{AccountingView.test.js → AccountingView.test.tsx} +0 -0
- /package/src/components/AccountingView/{index.js → index.ts} +0 -0
- /package/src/components/Achievement/{Achievement.test.js → Achievement.test.tsx} +0 -0
- /package/src/components/Achievement/{Achievement.js → Achievement.tsx} +0 -0
- /package/src/components/Achievement/{index.js → index.ts} +0 -0
- /package/src/components/AchievementsView/{AchievementsView.test.js → AchievementsView.test.tsx} +0 -0
- /package/src/components/AchievementsView/{index.js → index.ts} +0 -0
- /package/src/components/AnimatedNumber/{AnimatedNumber.test.js → AnimatedNumber.test.tsx} +0 -0
- /package/src/components/AnimatedNumber/{index.js → index.ts} +0 -0
- /package/src/components/AppBar/{AppBar.test.js → AppBar.test.tsx} +0 -0
- /package/src/components/AppBar/{index.js → index.ts} +0 -0
- /package/src/components/BailOutErrorBoundary/{BailOutErrorBoundary.test.js → BailOutErrorBoundary.test.tsx} +0 -0
- /package/src/components/BailOutErrorBoundary/{index.js → index.ts} +0 -0
- /package/src/components/Cellar/{Cellar.js → Cellar.tsx} +0 -0
- /package/src/components/Cellar/{FermentationTabPanel.js → FermentationTabPanel.tsx} +0 -0
- /package/src/components/Cellar/TabPanel/{index.js → index.tsx} +0 -0
- /package/src/components/Cellar/{WinemakingTabPanel.js → WinemakingTabPanel.tsx} +0 -0
- /package/src/components/Cellar/{index.js → index.ts} +0 -0
- /package/src/components/ChatRoom/{ChatRoom.js → ChatRoom.tsx} +0 -0
- /package/src/components/ChatRoom/{index.js → index.ts} +0 -0
- /package/src/components/ContextPane/{index.js → index.ts} +0 -0
- /package/src/components/CowCard/Bloodline/{Bloodline.js → Bloodline.tsx} +0 -0
- /package/src/components/CowCard/Bloodline/{index.js → index.ts} +0 -0
- /package/src/components/CowCard/{CowCard.test.js → CowCard.test.tsx} +0 -0
- /package/src/components/CowCard/Subheader/{Subheader.test.js → Subheader.test.tsx} +0 -0
- /package/src/components/CowCard/Subheader/{index.js → index.ts} +0 -0
- /package/src/components/CowCard/{index.js → index.ts} +0 -0
- /package/src/components/CowPen/{CowPen.js → CowPen.tsx} +0 -0
- /package/src/components/CowPen/{index.js → index.ts} +0 -0
- /package/src/components/CowPenContextMenu/{CowPenContextMenu.test.js → CowPenContextMenu.test.tsx} +0 -0
- /package/src/components/CowPenContextMenu/{CowPenContextMenu.js → CowPenContextMenu.tsx} +0 -0
- /package/src/components/CowPenContextMenu/TabPanel/{index.js → index.tsx} +0 -0
- /package/src/components/CowPenContextMenu/{index.js → index.ts} +0 -0
- /package/src/components/Elements/{index.js → index.ts} +0 -0
- /package/src/components/Farmhand/{Farmhand.test.js → Farmhand.test.ts} +0 -0
- /package/src/components/Farmhand/{FarmhandReducers.js → FarmhandReducers.tsx} +0 -0
- /package/src/components/Farmhand/helpers/{getInventoryQuantities.test.js → getInventoryQuantities.test.ts} +0 -0
- /package/src/components/Farmhand/helpers/{getInventoryQuantities.js → getInventoryQuantities.ts} +0 -0
- /package/src/components/Farmhand/{index.js → index.ts} +0 -0
- /package/src/components/Field/{index.js → index.ts} +0 -0
- /package/src/components/Forest/{Forest.js → Forest.tsx} +0 -0
- /package/src/components/Forest/{index.js → index.ts} +0 -0
- /package/src/components/Home/{Home.test.js → Home.test.tsx} +0 -0
- /package/src/components/Home/{index.js → index.ts} +0 -0
- /package/src/components/IngredientsList/{IngredientsList.test.js → IngredientsList.test.tsx} +0 -0
- /package/src/components/IngredientsList/{IngredientsList.js → IngredientsList.tsx} +0 -0
- /package/src/components/IngredientsList/{index.js → index.ts} +0 -0
- /package/src/components/Inventory/{Inventory.test.js → Inventory.test.tsx} +0 -0
- /package/src/components/Inventory/{index.js → index.ts} +0 -0
- /package/src/components/Item/{Item.test.js → Item.test.tsx} +0 -0
- /package/src/components/Item/{index.js → index.ts} +0 -0
- /package/src/components/KeybindingsView/{KeybindingsView.test.js → KeybindingsView.test.tsx} +0 -0
- /package/src/components/KeybindingsView/{KeybindingsView.js → KeybindingsView.tsx} +0 -0
- /package/src/components/KeybindingsView/{index.js → index.ts} +0 -0
- /package/src/components/LogView/{LogView.test.js → LogView.test.tsx} +0 -0
- /package/src/components/LogView/{index.js → index.ts} +0 -0
- /package/src/components/Navigation/{DayAndProgressContainer.js → DayAndProgressContainer.tsx} +0 -0
- /package/src/components/Navigation/{Navigation.test.js → Navigation.test.tsx} +0 -0
- /package/src/components/Navigation/{index.js → index.ts} +0 -0
- /package/src/components/NotificationSystem/{NotificationSystem.test.js → NotificationSystem.test.tsx} +0 -0
- /package/src/components/NotificationSystem/{index.js → index.ts} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.test.js → OnlinePeer.test.tsx} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{OnlinePeer.js → OnlinePeer.tsx} +0 -0
- /package/src/components/OnlinePeersView/OnlinePeer/{index.js → index.ts} +0 -0
- /package/src/components/OnlinePeersView/{OnlinePeersView.test.js → OnlinePeersView.test.tsx} +0 -0
- /package/src/components/OnlinePeersView/{index.js → index.ts} +0 -0
- /package/src/components/Plot/{index.js → index.ts} +0 -0
- /package/src/components/PriceEventView/{PriceEventView.js → PriceEventView.tsx} +0 -0
- /package/src/components/PriceEventView/{index.js → index.ts} +0 -0
- /package/src/components/ProgressBar/{ProgressBar.test.js → ProgressBar.test.tsx} +0 -0
- /package/src/components/ProgressBar/{index.js → index.ts} +0 -0
- /package/src/components/QuantityInput/{QuantityInput.test.js → QuantityInput.test.tsx} +0 -0
- /package/src/components/QuantityInput/{index.js → index.ts} +0 -0
- /package/src/components/QuickSelect/{QuickSelect.test.js → QuickSelect.test.tsx} +0 -0
- /package/src/components/QuickSelect/{QuickSelect.js → QuickSelect.tsx} +0 -0
- /package/src/components/QuickSelect/{index.js → index.ts} +0 -0
- /package/src/components/Recipe/{Recipe.test.js → Recipe.test.tsx} +0 -0
- /package/src/components/Recipe/{index.js → index.ts} +0 -0
- /package/src/components/RecipeList/{RecipeList.js → RecipeList.tsx} +0 -0
- /package/src/components/SearchBar/{SearchBar.test.js → SearchBar.test.tsx} +0 -0
- /package/src/components/SearchBar/{SearchBar.js → SearchBar.tsx} +0 -0
- /package/src/components/SearchBar/{index.js → index.ts} +0 -0
- /package/src/components/SettingsView/{RandomSeedInput.test.js → RandomSeedInput.test.tsx} +0 -0
- /package/src/components/SettingsView/{SettingsView.test.js → SettingsView.test.tsx} +0 -0
- /package/src/components/SettingsView/{SettingsView.js → SettingsView.tsx} +0 -0
- /package/src/components/SettingsView/{index.js → index.ts} +0 -0
- /package/src/components/Shop/{Shop.test.js → Shop.test.tsx} +0 -0
- /package/src/components/Shop/TabPanel/{index.js → index.tsx} +0 -0
- /package/src/components/Shop/{index.js → index.ts} +0 -0
- /package/src/components/Stage/{index.js → index.ts} +0 -0
- /package/src/components/StatsView/{StatsView.test.js → StatsView.test.tsx} +0 -0
- /package/src/components/StatsView/{StatsView.js → StatsView.tsx} +0 -0
- /package/src/components/StatsView/{index.js → index.ts} +0 -0
- /package/src/components/TierPurchase/{TierPurchase.test.js → TierPurchase.test.tsx} +0 -0
- /package/src/components/TierPurchase/{index.js → index.ts} +0 -0
- /package/src/components/Toolbelt/{Toolbelt.test.js → Toolbelt.test.tsx} +0 -0
- /package/src/components/Toolbelt/{index.js → index.ts} +0 -0
- /package/src/components/UpdateNotifier/{UpdateNotifier.js → UpdateNotifier.tsx} +0 -0
- /package/src/components/UpdateNotifier/{index.js → index.ts} +0 -0
- /package/src/components/UpgradePurchase/{UpgradePurchase.test.js → UpgradePurchase.test.tsx} +0 -0
- /package/src/components/UpgradePurchase/{index.js → index.ts} +0 -0
- /package/src/components/Workshop/{KitchenTabPanel.js → KitchenTabPanel.tsx} +0 -0
- /package/src/components/Workshop/{RecyclingTabPanel.js → RecyclingTabPanel.tsx} +0 -0
- /package/src/components/Workshop/TabPanel/{index.js → index.tsx} +0 -0
- /package/src/components/Workshop/{Workshop.js → Workshop.tsx} +0 -0
- /package/src/components/Workshop/{index.js → index.ts} +0 -0
- /package/src/{config.js → config.ts} +0 -0
- /package/src/data/__mocks__/{items.js → items.ts} +0 -0
- /package/src/data/__mocks__/{maps.js → maps.ts} +0 -0
- /package/src/data/__mocks__/{recipes.js → recipes.ts} +0 -0
- /package/src/data/__mocks__/{shop-inventory.js → shop-inventory.ts} +0 -0
- /package/src/data/crops/{index.js → index.ts} +0 -0
- /package/src/data/{fruit-names.js → fruit-names.ts} +0 -0
- /package/src/data/{items-map.js → items-map.ts} +0 -0
- /package/src/data/ores/{index.js → index.ts} +0 -0
- /package/src/data/{shop-inventory-cow.js → shop-inventory-cow.ts} +0 -0
- /package/src/data/{shop-inventory.js → shop-inventory.ts} +0 -0
- /package/src/data/{tools.js → tools.ts} +0 -0
- /package/src/factories/{CoalFactory.test.js → CoalFactory.test.ts} +0 -0
- /package/src/factories/{OreFactory.test.js → OreFactory.test.ts} +0 -0
- /package/src/factories/{StoneFactory.test.js → StoneFactory.test.ts} +0 -0
- /package/src/factories/{index.js → index.ts} +0 -0
- /package/src/game-logic/cows/{cow-selection.test.js → cow-selection.test.ts} +0 -0
- /package/src/game-logic/{item-purchase.test.js → item-purchase.test.ts} +0 -0
- /package/src/game-logic/{item-sell.test.js → item-sell.test.ts} +0 -0
- /package/src/game-logic/reducers/{addCowToInventory.js → addCowToInventory.ts} +0 -0
- /package/src/game-logic/reducers/{addExperience.test.js → addExperience.test.ts} +0 -0
- /package/src/game-logic/reducers/{addExperience.js → addExperience.ts} +0 -0
- /package/src/game-logic/reducers/{addItemToInventory.test.js → addItemToInventory.test.ts} +0 -0
- /package/src/game-logic/reducers/{addItemToInventory.js → addItemToInventory.ts} +0 -0
- /package/src/game-logic/reducers/{addKegToCellarInventory.js → addKegToCellarInventory.ts} +0 -0
- /package/src/game-logic/reducers/{addPeer.js → addPeer.ts} +0 -0
- /package/src/game-logic/reducers/{addRevenue.js → addRevenue.ts} +0 -0
- /package/src/game-logic/reducers/{adjustLoan.test.js → adjustLoan.test.ts} +0 -0
- /package/src/game-logic/reducers/{adjustLoan.js → adjustLoan.ts} +0 -0
- /package/src/game-logic/reducers/{applyCrows.test.js → applyCrows.test.ts} +0 -0
- /package/src/game-logic/reducers/{applyLoanInterest.test.js → applyLoanInterest.test.ts} +0 -0
- /package/src/game-logic/reducers/{applyPrecipitation.test.js → applyPrecipitation.test.ts} +0 -0
- /package/src/game-logic/reducers/{changeCowAutomaticHugState.test.js → changeCowAutomaticHugState.test.ts} +0 -0
- /package/src/game-logic/reducers/{changeCowBreedingPenResident.test.js → changeCowBreedingPenResident.test.ts} +0 -0
- /package/src/game-logic/reducers/{changeCowBreedingPenResident.js → changeCowBreedingPenResident.ts} +0 -0
- /package/src/game-logic/reducers/{changeCowName.test.js → changeCowName.test.ts} +0 -0
- /package/src/game-logic/reducers/{changeCowName.js → changeCowName.ts} +0 -0
- /package/src/game-logic/reducers/{clearPlot.test.js → clearPlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{clearPlot.js → clearPlot.ts} +0 -0
- /package/src/game-logic/reducers/{computeCowInventoryForNextDay.test.js → computeCowInventoryForNextDay.test.ts} +0 -0
- /package/src/game-logic/reducers/{computeCowInventoryForNextDay.js → computeCowInventoryForNextDay.ts} +0 -0
- /package/src/game-logic/reducers/{computeStateForNextDay.test.js → computeStateForNextDay.test.ts} +0 -0
- /package/src/game-logic/reducers/{consumeIngredients.test.js → consumeIngredients.test.ts} +0 -0
- /package/src/game-logic/reducers/{createPriceEvent.test.js → createPriceEvent.test.ts} +0 -0
- /package/src/game-logic/reducers/{createPriceEvent.js → createPriceEvent.ts} +0 -0
- /package/src/game-logic/reducers/{decrementItemFromInventory.test.js → decrementItemFromInventory.test.ts} +0 -0
- /package/src/game-logic/reducers/{decrementItemFromInventory.js → decrementItemFromInventory.ts} +0 -0
- /package/src/game-logic/reducers/{fertilizePlot.test.js → fertilizePlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{fertilizePlot.js → fertilizePlot.ts} +0 -0
- /package/src/game-logic/reducers/{forRange.test.js → forRange.test.ts} +0 -0
- /package/src/game-logic/reducers/{forRange.js → forRange.ts} +0 -0
- /package/src/game-logic/reducers/{generatePriceEvents.test.js → generatePriceEvents.test.ts} +0 -0
- /package/src/game-logic/reducers/{generatePriceEvents.js → generatePriceEvents.ts} +0 -0
- /package/src/game-logic/reducers/{harvestPlot.test.js → harvestPlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{helpers.js → helpers.tsx} +0 -0
- /package/src/game-logic/reducers/{hugCow.test.js → hugCow.test.ts} +0 -0
- /package/src/game-logic/reducers/{hugCow.js → hugCow.ts} +0 -0
- /package/src/game-logic/reducers/{incrementPlotContentAge.test.js → incrementPlotContentAge.test.ts} +0 -0
- /package/src/game-logic/reducers/{incrementPlotContentAge.js → incrementPlotContentAge.ts} +0 -0
- /package/src/game-logic/reducers/{index.js → index.ts} +0 -0
- /package/src/game-logic/reducers/{makeFermentationRecipe.test.js → makeFermentationRecipe.test.ts} +0 -0
- /package/src/game-logic/reducers/{makeRecipe.js → makeRecipe.ts} +0 -0
- /package/src/game-logic/reducers/{minePlot.test.js → minePlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{modifyCow.js → modifyCow.ts} +0 -0
- /package/src/game-logic/reducers/{modifyFieldPlotAt.js → modifyFieldPlotAt.ts} +0 -0
- /package/src/game-logic/reducers/{offerCow.test.js → offerCow.test.ts} +0 -0
- /package/src/game-logic/reducers/{offerCow.js → offerCow.ts} +0 -0
- /package/src/game-logic/reducers/{plantInPlot.test.js → plantInPlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{plantInPlot.js → plantInPlot.ts} +0 -0
- /package/src/game-logic/reducers/{prependPendingPeerMessage.test.js → prependPendingPeerMessage.test.ts} +0 -0
- /package/src/game-logic/reducers/{prependPendingPeerMessage.js → prependPendingPeerMessage.ts} +0 -0
- /package/src/game-logic/reducers/{processCellar.test.js → processCellar.test.ts} +0 -0
- /package/src/game-logic/reducers/{processCellar.js → processCellar.ts} +0 -0
- /package/src/game-logic/reducers/{processCowAttrition.test.js → processCowAttrition.test.ts} +0 -0
- /package/src/game-logic/reducers/{processCowAttrition.js → processCowAttrition.ts} +0 -0
- /package/src/game-logic/reducers/{processCowBreeding.test.js → processCowBreeding.test.ts} +0 -0
- /package/src/game-logic/reducers/{processCowBreeding.js → processCowBreeding.ts} +0 -0
- /package/src/game-logic/reducers/{processCowFertilizerProduction.test.js → processCowFertilizerProduction.test.ts} +0 -0
- /package/src/game-logic/reducers/{processFeedingCows.test.js → processFeedingCows.test.ts} +0 -0
- /package/src/game-logic/reducers/{processFeedingCows.js → processFeedingCows.ts} +0 -0
- /package/src/game-logic/reducers/{processField.js → processField.ts} +0 -0
- /package/src/game-logic/reducers/{processLevelUp.test.js → processLevelUp.test.ts} +0 -0
- /package/src/game-logic/reducers/{processMilkingCows.test.js → processMilkingCows.test.ts} +0 -0
- /package/src/game-logic/reducers/{processMilkingCows.js → processMilkingCows.ts} +0 -0
- /package/src/game-logic/reducers/{processNerfs.test.js → processNerfs.test.ts} +0 -0
- /package/src/game-logic/reducers/{processNerfs.js → processNerfs.ts} +0 -0
- /package/src/game-logic/reducers/{processSprinklers.test.js → processSprinklers.test.ts} +0 -0
- /package/src/game-logic/reducers/{processSprinklers.js → processSprinklers.ts} +0 -0
- /package/src/game-logic/reducers/{processWeather.test.js → processWeather.test.ts} +0 -0
- /package/src/game-logic/reducers/{processWeather.js → processWeather.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCellar.test.js → purchaseCellar.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCellar.js → purchaseCellar.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCombine.test.js → purchaseCombine.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCombine.js → purchaseCombine.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseComposter.test.js → purchaseComposter.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseComposter.js → purchaseComposter.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCow.test.js → purchaseCow.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCow.js → purchaseCow.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCowPen.test.js → purchaseCowPen.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseCowPen.js → purchaseCowPen.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseItem.test.js → purchaseItem.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseItem.js → purchaseItem.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseSmelter.test.js → purchaseSmelter.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseSmelter.js → purchaseSmelter.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseStorageExpansion.test.js → purchaseStorageExpansion.test.ts} +0 -0
- /package/src/game-logic/reducers/{purchaseStorageExpansion.js → purchaseStorageExpansion.ts} +0 -0
- /package/src/game-logic/reducers/{removeCowFromInventory.js → removeCowFromInventory.ts} +0 -0
- /package/src/game-logic/reducers/{removeFieldPlotAt.js → removeFieldPlotAt.ts} +0 -0
- /package/src/game-logic/reducers/{removeKegFromCellar.js → removeKegFromCellar.ts} +0 -0
- /package/src/game-logic/reducers/{removePeer.js → removePeer.ts} +0 -0
- /package/src/game-logic/reducers/{rotateNotificationLogs.test.js → rotateNotificationLogs.test.ts} +0 -0
- /package/src/game-logic/reducers/{selectCow.test.js → selectCow.test.ts} +0 -0
- /package/src/game-logic/reducers/{selectCow.js → selectCow.ts} +0 -0
- /package/src/game-logic/reducers/{sellCow.js → sellCow.ts} +0 -0
- /package/src/game-logic/reducers/{sellItem.js → sellItem.ts} +0 -0
- /package/src/game-logic/reducers/{sellKeg.test.js → sellKeg.test.ts} +0 -0
- /package/src/game-logic/reducers/{setScarecrow.test.js → setScarecrow.test.ts} +0 -0
- /package/src/game-logic/reducers/{setScarecrow.js → setScarecrow.ts} +0 -0
- /package/src/game-logic/reducers/{setSprinkler.test.js → setSprinkler.test.ts} +0 -0
- /package/src/game-logic/reducers/{setSprinkler.js → setSprinkler.ts} +0 -0
- /package/src/game-logic/reducers/{showNotification.test.js → showNotification.test.ts} +0 -0
- /package/src/game-logic/reducers/{showNotification.js → showNotification.ts} +0 -0
- /package/src/game-logic/reducers/{spawnWeeds.test.js → spawnWeeds.test.ts} +0 -0
- /package/src/game-logic/reducers/{unlockTool.test.js → unlockTool.test.ts} +0 -0
- /package/src/game-logic/reducers/{unlockTool.js → unlockTool.ts} +0 -0
- /package/src/game-logic/reducers/{updateAchievements.test.js → updateAchievements.test.ts} +0 -0
- /package/src/game-logic/reducers/{updateFinancialRecords.test.js → updateFinancialRecords.test.ts} +0 -0
- /package/src/game-logic/reducers/{updateFinancialRecords.js → updateFinancialRecords.ts} +0 -0
- /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.test.js → updateInventoryRecordsForNextDay.test.ts} +0 -0
- /package/src/game-logic/reducers/{updateInventoryRecordsForNextDay.js → updateInventoryRecordsForNextDay.ts} +0 -0
- /package/src/game-logic/reducers/{updateLearnedRecipes.test.js → updateLearnedRecipes.test.ts} +0 -0
- /package/src/game-logic/reducers/{updateLearnedRecipes.js → updateLearnedRecipes.ts} +0 -0
- /package/src/game-logic/reducers/{updatePlotShoveledState.js → updatePlotShoveledState.ts} +0 -0
- /package/src/game-logic/reducers/{updatePriceEvents.test.js → updatePriceEvents.test.ts} +0 -0
- /package/src/game-logic/reducers/{updatePriceEvents.js → updatePriceEvents.tsx} +0 -0
- /package/src/game-logic/reducers/{upgradeTool.test.js → upgradeTool.test.ts} +0 -0
- /package/src/game-logic/reducers/{upgradeTool.js → upgradeTool.ts} +0 -0
- /package/src/game-logic/reducers/{waterAllPlots.test.js → waterAllPlots.test.ts} +0 -0
- /package/src/game-logic/reducers/{waterAllPlots.js → waterAllPlots.ts} +0 -0
- /package/src/game-logic/reducers/{waterField.js → waterField.ts} +0 -0
- /package/src/game-logic/reducers/{waterPlot.test.js → waterPlot.test.ts} +0 -0
- /package/src/game-logic/reducers/{waterPlot.js → waterPlot.ts} +0 -0
- /package/src/game-logic/reducers/{withdrawCow.test.js → withdrawCow.test.ts} +0 -0
- /package/src/game-logic/reducers/{withdrawCow.js → withdrawCow.ts} +0 -0
- /package/src/img/__mocks__/{index.js → index.ts} +0 -0
- /package/src/img/{index.js → index.ts} +0 -0
- /package/src/interfaces/{Factory.js → Factory.ts} +0 -0
- /package/src/{mui-theme.js → mui-theme.ts} +0 -0
- /package/src/{polyfills.js → polyfills.ts} +0 -0
- /package/src/services/{cellar.js → cellar.ts} +0 -0
- /package/src/services/{wine.test.js → wine.test.ts} +0 -0
- /package/src/{setupTests.js → setupTests.ts} +0 -0
- /package/src/shell/{bootup.test.js → bootup.test.ts} +0 -0
- /package/src/shell/{field.test.js → field.test.ts} +0 -0
- /package/src/shell/{game-saving.test.js → game-saving.test.ts} +0 -0
- /package/src/shell/{navigation.test.js → navigation.test.ts} +0 -0
- /package/src/shell/{pending-notifications.test.js → pending-notifications.test.ts} +0 -0
- /package/src/{strings.js → strings.ts} +0 -0
- /package/src/test-utils/stubs/{cowStub.js → cowStub.ts} +0 -0
- /package/src/test-utils/stubs/{farmhandStub.js → farmhandStub.tsx} +0 -0
- /package/src/test-utils/stubs/{itemStub.js → itemStub.ts} +0 -0
- /package/src/test-utils/stubs/{peerMetadataStub.js → peerMetadataStub.ts} +0 -0
- /package/src/test-utils/stubs/{saveDataStubFactory.js → saveDataStubFactory.ts} +0 -0
- /package/src/test-utils/{ui.js → ui.ts} +0 -0
- /package/src/utils/__snapshots__/{index.test.js.snap → index.test.ts.snap} +0 -0
- /package/src/utils/{findInField.test.js → findInField.test.ts} +0 -0
- /package/src/utils/{findInField.js → findInField.ts} +0 -0
- /package/src/utils/{getCropLifecycleDuration.test.js → getCropLifecycleDuration.test.ts} +0 -0
- /package/src/utils/{getCropsAvailableToFerment.test.js → getCropsAvailableToFerment.test.ts} +0 -0
- /package/src/utils/{getItemBaseValue.js → getItemBaseValue.ts} +0 -0
- /package/src/utils/{getKegSpoilageRate.test.js → getKegSpoilageRate.test.ts} +0 -0
- /package/src/utils/{getKegSpoilageRate.js → getKegSpoilageRate.ts} +0 -0
- /package/src/utils/{getKegValue.test.js → getKegValue.test.ts} +0 -0
- /package/src/utils/{getKegValue.js → getKegValue.ts} +0 -0
- /package/src/utils/{getLevelEntitlements.test.js → getLevelEntitlements.test.ts} +0 -0
- /package/src/utils/{getMaxYieldOfFermentationRecipe.test.js → getMaxYieldOfFermentationRecipe.test.ts} +0 -0
- /package/src/utils/{getSaltRequirementsForFermentationRecipe.js → getSaltRequirementsForFermentationRecipe.ts} +0 -0
- /package/src/utils/{getWineVarietiesAvailableToMake.test.js → getWineVarietiesAvailableToMake.test.ts} +0 -0
- /package/src/utils/{getYeastRequiredForWine.js → getYeastRequiredForWine.ts} +0 -0
- /package/src/utils/{isItemAGrownCrop.js → isItemAGrownCrop.ts} +0 -0
- /package/src/utils/{levelAchieved.js → levelAchieved.ts} +0 -0
- /package/src/utils/{moneyString.test.js → moneyString.test.ts} +0 -0
- /package/src/utils/{moneyString.js → moneyString.ts} +0 -0
- /package/src/utils/{noop.js → noop.ts} +0 -0
- /package/src/utils/{totalIngredientsInRecipe.test.js → totalIngredientsInRecipe.test.ts} +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @property farmhand.module:enums.cropType
|
|
8
8
|
* @enum {string}
|
|
9
9
|
*/
|
|
10
|
-
export const cropType = /** @type {const} */
|
|
10
|
+
export const cropType = /** @type {const} */ {
|
|
11
11
|
ASPARAGUS: 'ASPARAGUS',
|
|
12
12
|
CARROT: 'CARROT',
|
|
13
13
|
CORN: 'CORN',
|
|
@@ -28,25 +28,25 @@ export const cropType = /** @type {const} */ ({
|
|
|
28
28
|
WATERMELON: 'WATERMELON',
|
|
29
29
|
WHEAT: 'WHEAT',
|
|
30
30
|
WEED: 'WEED',
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @property farmhand.module:enums.recipeType
|
|
35
35
|
* @enum {string}
|
|
36
36
|
*/
|
|
37
|
-
export const recipeType = /** @type {const} */
|
|
37
|
+
export const recipeType = /** @type {const} */ {
|
|
38
38
|
FERMENTATION: 'FERMENTATION',
|
|
39
39
|
FORGE: 'FORGE',
|
|
40
40
|
KITCHEN: 'KITCHEN',
|
|
41
41
|
RECYCLING: 'RECYCLING',
|
|
42
42
|
WINE: 'WINE',
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* @property farmhand.module:enums.fieldMode
|
|
47
47
|
* @enum {string}
|
|
48
48
|
*/
|
|
49
|
-
export const fieldMode = /** @type {const} */
|
|
49
|
+
export const fieldMode = /** @type {const} */ {
|
|
50
50
|
CLEANUP: 'CLEANUP',
|
|
51
51
|
FERTILIZE: 'FERTILIZE',
|
|
52
52
|
HARVEST: 'HARVEST',
|
|
@@ -56,13 +56,13 @@ export const fieldMode = /** @type {const} */ ({
|
|
|
56
56
|
SET_SPRINKLER: 'SET_SPRINKLER',
|
|
57
57
|
SET_SCARECROW: 'SET_SCARECROW',
|
|
58
58
|
WATER: 'WATER',
|
|
59
|
-
}
|
|
59
|
+
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* @property farmhand.module:enums.stageFocusType
|
|
63
63
|
* @enum {string}
|
|
64
64
|
*/
|
|
65
|
-
export const stageFocusType = /** @type {const} */
|
|
65
|
+
export const stageFocusType = /** @type {const} */ {
|
|
66
66
|
NONE: 'NONE', // Used for testing
|
|
67
67
|
HOME: 'HOME',
|
|
68
68
|
FIELD: 'FIELD',
|
|
@@ -72,23 +72,23 @@ export const stageFocusType = /** @type {const} */ ({
|
|
|
72
72
|
INVENTORY: 'INVENTORY',
|
|
73
73
|
WORKSHOP: 'WORKSHOP',
|
|
74
74
|
CELLAR: 'CELLAR',
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @property farmhand.module:enums.cropLifeStage
|
|
79
79
|
* @enum {string}
|
|
80
80
|
*/
|
|
81
|
-
export const cropLifeStage = /** @type {const} */
|
|
81
|
+
export const cropLifeStage = /** @type {const} */ {
|
|
82
82
|
SEED: 'SEED',
|
|
83
83
|
GROWING: 'GROWING',
|
|
84
84
|
GROWN: 'GROWN',
|
|
85
|
-
}
|
|
85
|
+
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* @property farmhand.module:enums.itemType
|
|
89
89
|
* @enum {string}
|
|
90
90
|
*/
|
|
91
|
-
export const itemType = /** @type {const} */
|
|
91
|
+
export const itemType = /** @type {const} */ {
|
|
92
92
|
COW_FEED: 'COW_FEED',
|
|
93
93
|
CRAFTED_ITEM: 'CRAFTED_ITEM',
|
|
94
94
|
CROP: 'CROP',
|
|
@@ -102,32 +102,32 @@ export const itemType = /** @type {const} */ ({
|
|
|
102
102
|
STONE: 'STONE',
|
|
103
103
|
TOOL_UPGRADE: 'TOOL_UPGRADE',
|
|
104
104
|
WEED: 'WEED',
|
|
105
|
-
}
|
|
105
|
+
}
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* @property farmhand.module:enums.fertilizerType
|
|
109
109
|
* @enum {string}
|
|
110
110
|
*/
|
|
111
|
-
export const fertilizerType = /** @type {const} */
|
|
111
|
+
export const fertilizerType = /** @type {const} */ {
|
|
112
112
|
NONE: 'NONE',
|
|
113
113
|
STANDARD: 'STANDARD',
|
|
114
114
|
RAINBOW: 'RAINBOW',
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* @property farmhand.module:enums.genders
|
|
119
119
|
* @enum {string}
|
|
120
120
|
*/
|
|
121
|
-
export const genders = /** @type {const} */
|
|
121
|
+
export const genders = /** @type {const} */ {
|
|
122
122
|
FEMALE: 'FEMALE',
|
|
123
123
|
MALE: 'MALE',
|
|
124
|
-
}
|
|
124
|
+
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* @property farmhand.module:enums.cowColors
|
|
128
128
|
* @enum {string}
|
|
129
129
|
*/
|
|
130
|
-
export const cowColors = /** @type {const} */
|
|
130
|
+
export const cowColors = /** @type {const} */ {
|
|
131
131
|
BLUE: 'BLUE',
|
|
132
132
|
BROWN: 'BROWN',
|
|
133
133
|
GREEN: 'GREEN',
|
|
@@ -136,7 +136,7 @@ export const cowColors = /** @type {const} */ ({
|
|
|
136
136
|
RAINBOW: 'RAINBOW',
|
|
137
137
|
WHITE: 'WHITE',
|
|
138
138
|
YELLOW: 'YELLOW',
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
|
|
141
141
|
const { RAINBOW, ...standardCowColors } = cowColors
|
|
142
142
|
export { standardCowColors }
|
|
@@ -145,7 +145,7 @@ export { standardCowColors }
|
|
|
145
145
|
* @property farmhand.module:enums.dialogView
|
|
146
146
|
* @enum {string}
|
|
147
147
|
*/
|
|
148
|
-
export const dialogView = /** @type {const} */
|
|
148
|
+
export const dialogView = /** @type {const} */ {
|
|
149
149
|
NONE: 'NONE',
|
|
150
150
|
ACCOUNTING: 'ACCOUNTING',
|
|
151
151
|
ACHIEVEMENTS: 'ACHIEVEMENTS',
|
|
@@ -155,50 +155,50 @@ export const dialogView = /** @type {const} */ ({
|
|
|
155
155
|
PRICE_EVENTS: 'PRICE_EVENTS',
|
|
156
156
|
SETTINGS: 'SETTINGS',
|
|
157
157
|
STATS: 'STATS',
|
|
158
|
-
}
|
|
158
|
+
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
161
|
* @property farmhand.module:enums.toolType
|
|
162
162
|
* @enum {string}
|
|
163
163
|
*/
|
|
164
|
-
export const toolType = /** @type {const} */
|
|
164
|
+
export const toolType = /** @type {const} */ {
|
|
165
165
|
SCYTHE: 'SCYTHE',
|
|
166
166
|
SHOVEL: 'SHOVEL',
|
|
167
167
|
HOE: 'HOE',
|
|
168
168
|
WATERING_CAN: 'WATERING_CAN',
|
|
169
|
-
}
|
|
169
|
+
}
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* @property farmhand.module:enums.toolLevel
|
|
173
173
|
* @enum {string}
|
|
174
174
|
*/
|
|
175
|
-
export const toolLevel = /** @type {const} */
|
|
175
|
+
export const toolLevel = /** @type {const} */ {
|
|
176
176
|
UNAVAILABLE: 'UNAVAILABLE',
|
|
177
177
|
DEFAULT: 'DEFAULT',
|
|
178
178
|
BRONZE: 'BRONZE',
|
|
179
179
|
IRON: 'IRON',
|
|
180
180
|
SILVER: 'SILVER',
|
|
181
181
|
GOLD: 'GOLD',
|
|
182
|
-
}
|
|
182
|
+
}
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
* @property farmhand.module:enums.notificationSeverity
|
|
186
186
|
* @enum {string}
|
|
187
187
|
*/
|
|
188
|
-
export const notificationSeverity = /** @type {const} */
|
|
188
|
+
export const notificationSeverity = /** @type {const} */ {
|
|
189
189
|
INFO: 'INFO',
|
|
190
190
|
SUCCESS: 'SUCCESS',
|
|
191
191
|
WARNING: 'WARNING',
|
|
192
192
|
ERROR: 'ERROR',
|
|
193
|
-
}
|
|
193
|
+
}
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* @property farmhand.module:enums.cowTradeRejectionReason
|
|
197
197
|
* @enum {string}
|
|
198
198
|
*/
|
|
199
|
-
export const cowTradeRejectionReason = /** @type {const} */
|
|
199
|
+
export const cowTradeRejectionReason = /** @type {const} */ {
|
|
200
200
|
REQUESTED_COW_UNAVAILABLE: 'REQUESTED_COW_UNAVAILABLE',
|
|
201
|
-
}
|
|
201
|
+
}
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
204
|
* @property farmhand.module:enums.cropFamily
|
|
@@ -17,9 +17,11 @@ export default class CoalFactory extends Factory {
|
|
|
17
17
|
const amount = chooseRandom([1, 1, 1, 2, 3])
|
|
18
18
|
|
|
19
19
|
for (let i = 0; i < amount; i++) {
|
|
20
|
+
// @ts-expect-error
|
|
20
21
|
spawns.push(this.spawnCoal())
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// @ts-expect-error
|
|
23
25
|
spawns.push(this.spawnStone())
|
|
24
26
|
|
|
25
27
|
return spawns
|
|
@@ -12,8 +12,10 @@ export default class OreFactory extends Factory {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super()
|
|
14
14
|
|
|
15
|
+
// @ts-expect-error
|
|
15
16
|
this.oreOptions = []
|
|
16
17
|
for (let o of SPAWNABLE_ORES) {
|
|
18
|
+
// @ts-expect-error
|
|
17
19
|
this.oreOptions.push({
|
|
18
20
|
ore: o,
|
|
19
21
|
weight: o.spawnChance || 0,
|
|
@@ -35,6 +37,7 @@ export default class OreFactory extends Factory {
|
|
|
35
37
|
* @private
|
|
36
38
|
**/
|
|
37
39
|
spawn() {
|
|
40
|
+
// @ts-expect-error
|
|
38
41
|
const spawnedOption = randomChoice(this.oreOptions)
|
|
39
42
|
return spawnedOption.ore
|
|
40
43
|
}
|
|
@@ -28,6 +28,7 @@ describe('ResourceFactory', () => {
|
|
|
28
28
|
false
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
+
// @ts-expect-error
|
|
31
32
|
expect(ResourceFactory.instance().generateResources(shovelLevel)).toEqual(
|
|
32
33
|
[]
|
|
33
34
|
)
|
|
@@ -39,6 +40,7 @@ describe('ResourceFactory', () => {
|
|
|
39
40
|
)
|
|
40
41
|
vi.mocked(randomChoice).mockReturnValueOnce({ itemType: itemType.ORE })
|
|
41
42
|
|
|
43
|
+
// @ts-expect-error
|
|
42
44
|
ResourceFactory.instance().generateResources(shovelLevel)
|
|
43
45
|
const factory = ResourceFactory.getFactoryForItemType(itemType.ORE)
|
|
44
46
|
|
|
@@ -52,6 +54,7 @@ describe('ResourceFactory', () => {
|
|
|
52
54
|
)
|
|
53
55
|
vi.mocked(randomChoice).mockReturnValueOnce({ itemType: itemType.FUEL })
|
|
54
56
|
|
|
57
|
+
// @ts-expect-error
|
|
55
58
|
ResourceFactory.instance().generateResources(shovelLevel)
|
|
56
59
|
const factory = ResourceFactory.getFactoryForItemType(itemType.FUEL)
|
|
57
60
|
|
|
@@ -65,6 +68,7 @@ describe('ResourceFactory', () => {
|
|
|
65
68
|
)
|
|
66
69
|
vi.mocked(randomChoice).mockReturnValueOnce({ itemType: itemType.STONE })
|
|
67
70
|
|
|
71
|
+
// @ts-expect-error
|
|
68
72
|
ResourceFactory.instance().generateResources(shovelLevel)
|
|
69
73
|
const factory = ResourceFactory.getFactoryForItemType(itemType.STONE)
|
|
70
74
|
|
|
@@ -32,6 +32,7 @@ let instance = null
|
|
|
32
32
|
*/
|
|
33
33
|
export default class ResourceFactory {
|
|
34
34
|
constructor() {
|
|
35
|
+
// @ts-expect-error
|
|
35
36
|
this.resourceOptions = [
|
|
36
37
|
{ weight: ORE_SPAWN_CHANCE, itemType: itemType.ORE },
|
|
37
38
|
{ weight: COAL_SPAWN_CHANCE, itemType: itemType.FUEL },
|
|
@@ -46,6 +47,7 @@ export default class ResourceFactory {
|
|
|
46
47
|
*/
|
|
47
48
|
static instance() {
|
|
48
49
|
if (!instance) {
|
|
50
|
+
// @ts-expect-error
|
|
49
51
|
instance = new ResourceFactory()
|
|
50
52
|
}
|
|
51
53
|
|
|
@@ -117,11 +119,13 @@ export default class ResourceFactory {
|
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
if (randomNumberService.isRandomNumberLessThan(spawnChance)) {
|
|
122
|
+
// @ts-expect-error
|
|
120
123
|
const opt = randomChoice(this.resourceOptions)
|
|
121
124
|
const factory = ResourceFactory.getFactoryForItemType(opt.itemType)
|
|
122
125
|
|
|
123
126
|
if (factory) {
|
|
124
127
|
const generated = factory.generate()
|
|
128
|
+
// @ts-expect-error
|
|
125
129
|
resources = Array.isArray(generated) ? generated : [generated]
|
|
126
130
|
}
|
|
127
131
|
}
|
|
@@ -19,6 +19,7 @@ export async function getData(url = '', data = {}) {
|
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
// Default options are marked with *
|
|
22
|
+
// @ts-expect-error
|
|
22
23
|
const response = await fetch(`${url}?${params}`, {
|
|
23
24
|
...commonFetchConfig,
|
|
24
25
|
method: 'GET',
|
|
@@ -29,6 +30,7 @@ export async function getData(url = '', data = {}) {
|
|
|
29
30
|
|
|
30
31
|
export async function postData(url = '', data = {}) {
|
|
31
32
|
// Default options are marked with *
|
|
33
|
+
// @ts-expect-error
|
|
32
34
|
const response = await fetch(url, {
|
|
33
35
|
...commonFetchConfig,
|
|
34
36
|
method: 'POST',
|
|
@@ -30,7 +30,8 @@ describe('field expansion purchasing', () => {
|
|
|
30
30
|
|
|
31
31
|
// Open the list of field options
|
|
32
32
|
await userEvent.click(
|
|
33
|
-
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
within(/** @type {HTMLElement} */ expandFieldContainer).getByRole(
|
|
34
35
|
'combobox'
|
|
35
36
|
)
|
|
36
37
|
)
|
|
@@ -41,7 +42,8 @@ describe('field expansion purchasing', () => {
|
|
|
41
42
|
|
|
42
43
|
// Make the purchase
|
|
43
44
|
await userEvent.click(
|
|
44
|
-
|
|
45
|
+
// @ts-expect-error
|
|
46
|
+
within(/** @type {HTMLElement} */ expandFieldContainer).getByRole(
|
|
45
47
|
'button'
|
|
46
48
|
)
|
|
47
49
|
)
|
|
@@ -46,6 +46,7 @@ export const applyCrows = state => {
|
|
|
46
46
|
|
|
47
47
|
forEachPlot(state, (_plotContents, x, y) => {
|
|
48
48
|
if (doesPlotContainCrop(state.field[y][x])) {
|
|
49
|
+
// @ts-expect-error
|
|
49
50
|
plotsWithCrops.push({ x, y })
|
|
50
51
|
}
|
|
51
52
|
})
|
|
@@ -60,11 +61,13 @@ export const applyCrows = state => {
|
|
|
60
61
|
const attackPlotId = Math.floor(random() * plotsWithCrops.length)
|
|
61
62
|
const target = plotsWithCrops.splice(attackPlotId, 1)[0]
|
|
62
63
|
|
|
64
|
+
// @ts-expect-error
|
|
63
65
|
state = modifyFieldPlotAt(state, target.x, target.y, () => null)
|
|
64
66
|
numCropsDestroyed += 1
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
if (numCropsDestroyed > 0) {
|
|
70
|
+
// @ts-expect-error
|
|
68
71
|
notificationMessages.push(CROWS_DESTROYED('', numCropsDestroyed))
|
|
69
72
|
}
|
|
70
73
|
|
|
@@ -17,7 +17,7 @@ export const applyLoanInterest = state => {
|
|
|
17
17
|
? [
|
|
18
18
|
...state.newDayNotifications,
|
|
19
19
|
{
|
|
20
|
-
severity: /** @type {farmhand.notificationSeverity} */
|
|
20
|
+
severity: /** @type {farmhand.notificationSeverity} */ 'warning',
|
|
21
21
|
message: LOAN_BALANCE_NOTIFICATION('', newLoanBalance),
|
|
22
22
|
},
|
|
23
23
|
]
|
|
@@ -26,10 +26,10 @@ export const applyPrecipitation = state => {
|
|
|
26
26
|
|
|
27
27
|
if (shouldStormToday()) {
|
|
28
28
|
if (fieldHasScarecrow(field)) {
|
|
29
|
-
notification = /** @type {farmhand.notification} */
|
|
29
|
+
notification = /** @type {farmhand.notification} */ {
|
|
30
30
|
message: STORM_DESTROYS_SCARECROWS_MESSAGE,
|
|
31
31
|
severity: 'error',
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
let { scarecrow: scarecrowsInInventory = 0 } = getInventoryQuantityMap(
|
|
35
35
|
state.inventory
|
|
@@ -54,16 +54,16 @@ export const applyPrecipitation = state => {
|
|
|
54
54
|
return null
|
|
55
55
|
})
|
|
56
56
|
} else {
|
|
57
|
-
notification = /** @type {farmhand.notification} */
|
|
57
|
+
notification = /** @type {farmhand.notification} */ {
|
|
58
58
|
message: STORM_MESSAGE,
|
|
59
59
|
severity: 'info',
|
|
60
|
-
}
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
62
|
} else {
|
|
63
|
-
notification = /** @type {farmhand.notification} */
|
|
63
|
+
notification = /** @type {farmhand.notification} */ {
|
|
64
64
|
message: RAIN_MESSAGE,
|
|
65
65
|
severity: 'info',
|
|
66
|
-
}
|
|
66
|
+
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
state = decrementItemFromInventory(
|
package/src/game-logic/reducers/{changeCowAutomaticHugState.js → changeCowAutomaticHugState.ts}
RENAMED
|
@@ -22,8 +22,8 @@ export const changeCowAutomaticHugState = (state, cow, doUseHuggingMachine) => {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
state = modifyCow(state, cow.id,
|
|
26
|
-
...
|
|
25
|
+
state = modifyCow(state, cow.id, updatedCow => ({
|
|
26
|
+
...updatedCow,
|
|
27
27
|
isUsingHuggingMachine: doUseHuggingMachine,
|
|
28
28
|
}))
|
|
29
29
|
|
|
@@ -63,12 +63,12 @@ export const computeStateForNextDay = (state, isFirstDay = false) => {
|
|
|
63
63
|
|
|
64
64
|
state = reducers.concat([adjustItemValues]).reduce(
|
|
65
65
|
(acc, fn) => fn({ ...acc }),
|
|
66
|
-
/** @type {farmhand.state} */
|
|
66
|
+
/** @type {farmhand.state} */ {
|
|
67
67
|
...state,
|
|
68
68
|
cowForSale: generateCow(),
|
|
69
69
|
dayCount: state.dayCount + 1,
|
|
70
70
|
todaysNotifications: [],
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
72
|
)
|
|
73
73
|
|
|
74
74
|
if (state.dayCount % 365 === 0) {
|
|
@@ -28,9 +28,9 @@ export const consumeIngredients = (
|
|
|
28
28
|
state = addExperience(state, experiencePoints)
|
|
29
29
|
|
|
30
30
|
return Object.keys(recipe.ingredients || {}).reduce(
|
|
31
|
-
(
|
|
31
|
+
(reducerState, ingredientId) =>
|
|
32
32
|
decrementItemFromInventory(
|
|
33
|
-
|
|
33
|
+
reducerState,
|
|
34
34
|
ingredientId,
|
|
35
35
|
recipe.ingredients[ingredientId] * recipeYield
|
|
36
36
|
),
|
|
@@ -87,13 +87,13 @@ function harvestCrops(state, x, y) {
|
|
|
87
87
|
|
|
88
88
|
if (seedsForHarvestedCropAreAvailable) {
|
|
89
89
|
state = plantInPlot(state, x, y, seedItemIdForCrop)
|
|
90
|
-
state = modifyFieldPlotAt(state, x, y,
|
|
91
|
-
if (!
|
|
92
|
-
return
|
|
90
|
+
state = modifyFieldPlotAt(state, x, y, updatedCrop => {
|
|
91
|
+
if (!updatedCrop) {
|
|
92
|
+
return updatedCrop
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
return {
|
|
96
|
-
...
|
|
96
|
+
...updatedCrop,
|
|
97
97
|
fertilizerType: fertilizerType.RAINBOW,
|
|
98
98
|
}
|
|
99
99
|
})
|
|
@@ -55,14 +55,17 @@ describe('makeRecipe', () => {
|
|
|
55
55
|
[recipeType.FORGE, EXPERIENCE_VALUES.FORGE_RECIPE_MADE],
|
|
56
56
|
[recipeType.KITCHEN, EXPERIENCE_VALUES.KITCHEN_RECIPE_MADE],
|
|
57
57
|
[recipeType.RECYCLING, EXPERIENCE_VALUES.RECYCLING_RECIPE_MADE],
|
|
58
|
-
])(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
])(
|
|
59
|
+
'adds experience for a %s recipe',
|
|
60
|
+
(recipeTypeLabel, experienceValue) => {
|
|
61
|
+
const { experience } = makeRecipe(state, {
|
|
62
|
+
...carrotSoup,
|
|
63
|
+
ingredients: {},
|
|
64
|
+
recipeType: recipeTypeLabel,
|
|
65
|
+
})
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
expect(experience).toEqual(experienceValue)
|
|
68
|
+
}
|
|
69
|
+
)
|
|
67
70
|
})
|
|
68
71
|
})
|
|
@@ -13,7 +13,6 @@ import { makeWine } from './makeWine.js'
|
|
|
13
13
|
const stubKegUuid = 'abc123'
|
|
14
14
|
|
|
15
15
|
beforeEach(() => {
|
|
16
|
-
// @ts-expect-error
|
|
17
16
|
vitest.spyOn(cellarService, '_uuid').mockReturnValue(stubKegUuid)
|
|
18
17
|
})
|
|
19
18
|
|
|
@@ -169,7 +168,6 @@ describe('makeWine', () => {
|
|
|
169
168
|
])(
|
|
170
169
|
'makes $expected.cellarInventory.length wine unit(s) based on $state.inventory.0.id: $state.inventory.0.quantity, $state.inventory.1.id: $state.inventory.1.quantity',
|
|
171
170
|
({ state, grape, howMany, expected }) => {
|
|
172
|
-
// @ts-expect-error
|
|
173
171
|
const result = makeWine(state, grape, howMany)
|
|
174
172
|
|
|
175
173
|
expect(result).toEqual(expected)
|
package/src/game-logic/reducers/{processCellarSpoilage.test.js → processCellarSpoilage.test.ts}
RENAMED
|
@@ -15,7 +15,6 @@ describe('processCellarSpoilage', () => {
|
|
|
15
15
|
const cellarInventory = [keg]
|
|
16
16
|
const newDayNotifications = []
|
|
17
17
|
|
|
18
|
-
// @ts-expect-error
|
|
19
18
|
const expectedState = processCellarSpoilage({
|
|
20
19
|
cellarInventory,
|
|
21
20
|
newDayNotifications,
|
|
@@ -33,7 +32,6 @@ describe('processCellarSpoilage', () => {
|
|
|
33
32
|
const cellarInventory = [keg]
|
|
34
33
|
const newDayNotifications = []
|
|
35
34
|
|
|
36
|
-
// @ts-expect-error
|
|
37
35
|
const expectedState = processCellarSpoilage({
|
|
38
36
|
cellarInventory,
|
|
39
37
|
newDayNotifications,
|
|
@@ -51,7 +49,6 @@ describe('processCellarSpoilage', () => {
|
|
|
51
49
|
const cellarInventory = [keg]
|
|
52
50
|
const newDayNotifications = []
|
|
53
51
|
|
|
54
|
-
// @ts-expect-error
|
|
55
52
|
const expectedState = processCellarSpoilage({
|
|
56
53
|
cellarInventory,
|
|
57
54
|
newDayNotifications,
|
|
@@ -69,7 +66,6 @@ describe('processCellarSpoilage', () => {
|
|
|
69
66
|
const cellarInventory = [keg]
|
|
70
67
|
const newDayNotifications = []
|
|
71
68
|
|
|
72
|
-
// @ts-expect-error
|
|
73
69
|
const expectedState = processCellarSpoilage({
|
|
74
70
|
cellarInventory,
|
|
75
71
|
newDayNotifications,
|
|
@@ -77,7 +73,6 @@ describe('processCellarSpoilage', () => {
|
|
|
77
73
|
|
|
78
74
|
expect(expectedState.newDayNotifications).toEqual([
|
|
79
75
|
{
|
|
80
|
-
// @ts-expect-error
|
|
81
76
|
message: KEG_SPOILED_MESSAGE`${keg}`,
|
|
82
77
|
severity: 'error',
|
|
83
78
|
},
|
|
@@ -44,7 +44,7 @@ export const processCowFertilizerProduction = state => {
|
|
|
44
44
|
newDayNotifications.push({
|
|
45
45
|
message: FERTILIZERS_PRODUCED(
|
|
46
46
|
'',
|
|
47
|
-
/** @type {Record<string, number>} */
|
|
47
|
+
/** @type {Record<string, number>} */ fertilizersProduced
|
|
48
48
|
),
|
|
49
49
|
severity: 'success',
|
|
50
50
|
})
|
|
@@ -35,7 +35,9 @@ export const processLevelUp = (state, oldLevel) => {
|
|
|
35
35
|
getRandomLevelUpRewardQuantity(i),
|
|
36
36
|
true
|
|
37
37
|
)
|
|
38
|
+
// @ts-expect-error
|
|
38
39
|
} else if (levelObject?.unlocksTool) {
|
|
40
|
+
// @ts-expect-error
|
|
39
41
|
state = unlockTool(state, levelObject.unlocksTool)
|
|
40
42
|
}
|
|
41
43
|
// This handles an edge case where the player levels up to level that
|
|
@@ -43,6 +45,7 @@ export const processLevelUp = (state, oldLevel) => {
|
|
|
43
45
|
// selected. In that case, update the hoveredPlotRangeSize state.
|
|
44
46
|
else if (
|
|
45
47
|
levelObject &&
|
|
48
|
+
// @ts-expect-error
|
|
46
49
|
levelObject.increasesSprinklerRange &&
|
|
47
50
|
selectedItemId === SPRINKLER_ITEM_ID
|
|
48
51
|
) {
|
|
@@ -25,9 +25,10 @@ export const purchaseField = (state, fieldId) => {
|
|
|
25
25
|
return {
|
|
26
26
|
...state,
|
|
27
27
|
purchasedField: fieldId,
|
|
28
|
-
field: nullArray(rows).map((_,
|
|
28
|
+
field: nullArray(rows).map((_, rowIndex) =>
|
|
29
29
|
nullArray(columns).map(
|
|
30
|
-
(
|
|
30
|
+
(__, columnIdx) =>
|
|
31
|
+
(field[rowIndex] && field[rowIndex][columnIdx]) || null
|
|
31
32
|
)
|
|
32
33
|
),
|
|
33
34
|
money: moneyTotal(money, -price),
|
|
@@ -62,7 +62,7 @@ describe('purchaseForest', () => {
|
|
|
62
62
|
|
|
63
63
|
describe('forest expansion', () => {
|
|
64
64
|
test('forest expands without destroying existing data', () => {
|
|
65
|
-
const expectedForest = /** @type {Array<Array<any>>} */
|
|
65
|
+
const expectedForest = /** @type {Array<Array<any>>} */ []
|
|
66
66
|
const forestSize = PURCHASABLE_FOREST_SIZES.get(1)
|
|
67
67
|
|
|
68
68
|
if (!forestSize) {
|
|
@@ -70,10 +70,12 @@ describe('purchaseForest', () => {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
for (let y = 0; y < forestSize.rows; y++) {
|
|
73
|
-
const row = /** @type {Array<any>} */
|
|
73
|
+
const row = /** @type {Array<any>} */ []
|
|
74
74
|
for (let x = 0; x < forestSize.columns; x++) {
|
|
75
|
+
// @ts-expect-error
|
|
75
76
|
row.push(null)
|
|
76
77
|
}
|
|
78
|
+
// @ts-expect-error
|
|
77
79
|
expectedForest.push(row)
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -88,7 +90,9 @@ describe('purchaseForest', () => {
|
|
|
88
90
|
1
|
|
89
91
|
)
|
|
90
92
|
|
|
93
|
+
// @ts-expect-error
|
|
91
94
|
expectedForest[0][0] = testTree()
|
|
95
|
+
// @ts-expect-error
|
|
92
96
|
expectedForest[1][1] = testTree()
|
|
93
97
|
|
|
94
98
|
expect(forest).toEqual(expectedForest)
|