Skip to content

Commit

Permalink
Fix CurrencyStatic.buyItem param optional
Browse files Browse the repository at this point in the history
  • Loading branch information
xShadowBlade committed Jul 20, 2024
1 parent e17bed6 commit 32461dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/types/classes/Currency.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ declare class CurrencyStatic<UpgradeInitArray extends Readonly<UpgradeInit>[] =
* @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 };
2 changes: 1 addition & 1 deletion src/classes/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 32461dd

Please sign in to comment.