import type { CardType, CollectibleType, TrinketType, } from "../../enums/collections/subTypes"; import type { NullItemID } from "../../enums/NullItemID"; import type { PillEffect } from "../../enums/PillEffect"; declare global { interface ItemConfig extends IsaacAPIClass { /** Returns undefined if the card was not found. */ GetCard: (cardType: CardType) => Readonly | undefined; GetCards: () => Readonly; /** Returns undefined if the collectible type was not found. */ GetCollectible: ( collectibleType: CollectibleType, ) => Readonly | undefined; GetCollectibles: () => Readonly; /** Returns undefined if the item was not found. */ GetNullItem: ( nullItemID: NullItemID, ) => Readonly | undefined; GetNullItems: () => Readonly; /** Returns undefined if the pill effect was not found. */ GetPillEffect: ( pillEffect: PillEffect, ) => Readonly | undefined; GetPillEffects: () => Readonly; /** Returns undefined if the trinket was not found. */ GetTrinket: ( trinketType: TrinketType, ) => Readonly | undefined; GetTrinkets: () => Readonly; /** * In the "enums.lua" file, the ItemConfig class is extended with many members: * * - ItemConfig.CHARGE_* * - ItemConfig.TAG_* * - ItemConfig.CARDTYPE_* * * In IsaacScript, these are instead implemented as enums, since it is cleaner. See * `ItemConfigChargeType`, `ItemConfigTag`, and `ItemConfigCardType` respectively. */ } /** * The static methods in this class can only be called by the global variable. * * e.g. `ItemConfig.Config.IsValidCollectible(1)` */ namespace ItemConfig { /** * @deprecated This method does not work properly for modded items, so it should never be used. * Use the `isValidCollectibleType` helper function instead. */ function IsValidCollectible(collectibleType: CollectibleType): boolean; function ShouldAddCostumeOnPickup(): boolean; } }