From 32461ddf38924c08c951e5754db70e2f9dfac035 Mon Sep 17 00:00:00 2001 From: zBlade Date: Fri, 19 Jul 2024 22:37:21 -0400 Subject: [PATCH] Fix CurrencyStatic.buyItem param optional --- dist/types/classes/Currency.d.ts | 2 +- src/classes/Currency.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/types/classes/Currency.d.ts b/dist/types/classes/Currency.d.ts index 1ffa298..914eec8 100644 --- a/dist/types/classes/Currency.d.ts +++ b/dist/types/classes/Currency.d.ts @@ -301,6 +301,6 @@ declare class CurrencyStatic[] = * @param target - The target level or quantity to reach for the item. See the argument in {@link calculateItem}. * @returns Returns true if the purchase or upgrade is successful, or false if there is not enough currency or the item does not exist. */ - buyItem(id: ItemIds, tier: DecimalSource, target?: DecimalSource): boolean; + buyItem(id: ItemIds, tier?: DecimalSource, target?: DecimalSource): boolean; } export { Currency, CurrencyStatic }; diff --git a/src/classes/Currency.ts b/src/classes/Currency.ts index 045a4c4..e581f68 100644 --- a/src/classes/Currency.ts +++ b/src/classes/Currency.ts @@ -625,7 +625,7 @@ class CurrencyStatic< * @param target - The target level or quantity to reach for the item. See the argument in {@link calculateItem}. * @returns Returns true if the purchase or upgrade is successful, or false if there is not enough currency or the item does not exist. */ - public buyItem (id: ItemIds, tier: DecimalSource, target?: DecimalSource): boolean { + public buyItem (id: ItemIds, tier?: DecimalSource, target?: DecimalSource): boolean { // Get the item const item = this.getItem(id);