isaacscript-common 81.0.3 → 81.0.5

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 (152) hide show
  1. package/dist/classes/ModFeature.d.ts +1 -1
  2. package/dist/classes/ModFeature.d.ts.map +1 -1
  3. package/dist/classes/features/other/CustomItemPools.d.ts +1 -1
  4. package/dist/classes/features/other/CustomItemPools.d.ts.map +1 -1
  5. package/dist/classes/features/other/CustomItemPools.lua +4 -2
  6. package/dist/classes/features/other/DisableInputs.d.ts +1 -1
  7. package/dist/classes/features/other/DisableInputs.d.ts.map +1 -1
  8. package/dist/classes/features/other/ModdedElementSets.d.ts +4 -4
  9. package/dist/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  10. package/dist/classes/features/other/ModdedElementSets.lua +7 -2
  11. package/dist/classes/features/other/SaveDataManager.d.ts +1 -1
  12. package/dist/classes/features/other/SaveDataManager.d.ts.map +1 -1
  13. package/dist/functions/array.d.ts +5 -5
  14. package/dist/functions/array.d.ts.map +1 -1
  15. package/dist/functions/arrayLua.d.ts +14 -14
  16. package/dist/functions/arrayLua.d.ts.map +1 -1
  17. package/dist/functions/arrayLua.lua +7 -7
  18. package/dist/functions/benchmark.d.ts +1 -1
  19. package/dist/functions/benchmark.d.ts.map +1 -1
  20. package/dist/functions/bitwise.d.ts +1 -1
  21. package/dist/functions/bitwise.d.ts.map +1 -1
  22. package/dist/functions/cards.d.ts +1 -1
  23. package/dist/functions/cards.d.ts.map +1 -1
  24. package/dist/functions/challenges.d.ts +1 -1
  25. package/dist/functions/challenges.d.ts.map +1 -1
  26. package/dist/functions/curses.d.ts +1 -1
  27. package/dist/functions/curses.d.ts.map +1 -1
  28. package/dist/functions/doors.d.ts +5 -5
  29. package/dist/functions/doors.d.ts.map +1 -1
  30. package/dist/functions/external.d.ts +1 -1
  31. package/dist/functions/external.d.ts.map +1 -1
  32. package/dist/functions/flag.d.ts +5 -4
  33. package/dist/functions/flag.d.ts.map +1 -1
  34. package/dist/functions/gridEntities.d.ts +5 -5
  35. package/dist/functions/gridEntities.d.ts.map +1 -1
  36. package/dist/functions/input.d.ts +5 -5
  37. package/dist/functions/input.d.ts.map +1 -1
  38. package/dist/functions/itemPool.d.ts +2 -2
  39. package/dist/functions/itemPool.d.ts.map +1 -1
  40. package/dist/functions/jsonRoom.d.ts +1 -1
  41. package/dist/functions/jsonRoom.d.ts.map +1 -1
  42. package/dist/functions/level.d.ts +2 -2
  43. package/dist/functions/level.d.ts.map +1 -1
  44. package/dist/functions/levelGrid.d.ts +2 -2
  45. package/dist/functions/levelGrid.d.ts.map +1 -1
  46. package/dist/functions/logEntities.d.ts +3 -3
  47. package/dist/functions/logEntities.d.ts.map +1 -1
  48. package/dist/functions/logMisc.d.ts +2 -1
  49. package/dist/functions/logMisc.d.ts.map +1 -1
  50. package/dist/functions/map.d.ts.map +1 -1
  51. package/dist/functions/merge.d.ts +1 -1
  52. package/dist/functions/merge.d.ts.map +1 -1
  53. package/dist/functions/minimap.d.ts +1 -1
  54. package/dist/functions/minimap.d.ts.map +1 -1
  55. package/dist/functions/npcDataStructures.d.ts +3 -3
  56. package/dist/functions/npcDataStructures.d.ts.map +1 -1
  57. package/dist/functions/playerCollectibles.d.ts +7 -7
  58. package/dist/functions/playerCollectibles.d.ts.map +1 -1
  59. package/dist/functions/playerDataStructures.d.ts +3 -3
  60. package/dist/functions/playerDataStructures.d.ts.map +1 -1
  61. package/dist/functions/playerTrinkets.d.ts +2 -2
  62. package/dist/functions/playerTrinkets.d.ts.map +1 -1
  63. package/dist/functions/players.d.ts +4 -4
  64. package/dist/functions/players.d.ts.map +1 -1
  65. package/dist/functions/rng.d.ts +3 -2
  66. package/dist/functions/rng.d.ts.map +1 -1
  67. package/dist/functions/rooms.d.ts +4 -4
  68. package/dist/functions/rooms.d.ts.map +1 -1
  69. package/dist/functions/run.d.ts +2 -2
  70. package/dist/functions/run.d.ts.map +1 -1
  71. package/dist/functions/set.d.ts.map +1 -1
  72. package/dist/functions/sort.d.ts +1 -1
  73. package/dist/functions/sort.d.ts.map +1 -1
  74. package/dist/functions/stage.d.ts +3 -3
  75. package/dist/functions/stage.d.ts.map +1 -1
  76. package/dist/functions/string.d.ts +3 -2
  77. package/dist/functions/string.d.ts.map +1 -1
  78. package/dist/functions/table.d.ts +4 -4
  79. package/dist/functions/table.d.ts.map +1 -1
  80. package/dist/functions/trinketGive.d.ts +1 -1
  81. package/dist/functions/trinketGive.d.ts.map +1 -1
  82. package/dist/functions/utils.d.ts +1 -1
  83. package/dist/functions/utils.d.ts.map +1 -1
  84. package/dist/functions/vector.d.ts +1 -1
  85. package/dist/functions/vector.d.ts.map +1 -1
  86. package/dist/functions/weighted.d.ts +2 -2
  87. package/dist/functions/weighted.d.ts.map +1 -1
  88. package/dist/index.d.ts +1 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.rollup.d.ts +110 -108
  91. package/dist/indexLua.d.ts +1 -0
  92. package/dist/indexLua.d.ts.map +1 -1
  93. package/dist/isaacscript-common.lua +23 -12
  94. package/dist/types/AnyFunction.d.ts +1 -1
  95. package/dist/types/AnyFunction.d.ts.map +1 -1
  96. package/dist/types/ReadonlyRecord.d.ts +2 -0
  97. package/dist/types/ReadonlyRecord.d.ts.map +1 -0
  98. package/dist/types/ReadonlyRecord.lua +2 -0
  99. package/package.json +1 -1
  100. package/src/classes/ModFeature.ts +4 -4
  101. package/src/classes/ModUpgraded.ts +1 -1
  102. package/src/classes/features/callbackLogic/PlayerReorderedCallbacks.ts +1 -0
  103. package/src/classes/features/other/CustomItemPools.ts +10 -3
  104. package/src/classes/features/other/DisableInputs.ts +4 -1
  105. package/src/classes/features/other/ItemPoolDetection.ts +2 -2
  106. package/src/classes/features/other/ModdedElementSets.ts +6 -6
  107. package/src/classes/features/other/PickupIndexCreation.ts +1 -1
  108. package/src/classes/features/other/RunInNFrames.ts +2 -0
  109. package/src/classes/features/other/SaveDataManager.ts +3 -1
  110. package/src/core/upgradeMod.ts +4 -1
  111. package/src/functions/array.ts +18 -5
  112. package/src/functions/arrayLua.ts +20 -20
  113. package/src/functions/benchmark.ts +1 -1
  114. package/src/functions/bitwise.ts +1 -1
  115. package/src/functions/cards.ts +1 -1
  116. package/src/functions/challenges.ts +1 -1
  117. package/src/functions/curses.ts +1 -1
  118. package/src/functions/deepCopy.ts +6 -6
  119. package/src/functions/doors.ts +7 -5
  120. package/src/functions/external.ts +1 -1
  121. package/src/functions/flag.ts +5 -4
  122. package/src/functions/gridEntities.ts +5 -5
  123. package/src/functions/input.ts +5 -5
  124. package/src/functions/itemPool.ts +4 -2
  125. package/src/functions/jsonRoom.ts +1 -1
  126. package/src/functions/level.ts +2 -2
  127. package/src/functions/levelGrid.ts +2 -2
  128. package/src/functions/logEntities.ts +6 -3
  129. package/src/functions/logMisc.ts +2 -1
  130. package/src/functions/map.ts +2 -0
  131. package/src/functions/merge.ts +4 -3
  132. package/src/functions/minimap.ts +1 -1
  133. package/src/functions/npcDataStructures.ts +11 -3
  134. package/src/functions/playerCollectibles.ts +7 -7
  135. package/src/functions/playerDataStructures.ts +8 -3
  136. package/src/functions/playerTrinkets.ts +2 -2
  137. package/src/functions/players.ts +6 -4
  138. package/src/functions/rng.ts +8 -2
  139. package/src/functions/rooms.ts +4 -4
  140. package/src/functions/run.ts +6 -2
  141. package/src/functions/set.ts +3 -0
  142. package/src/functions/sort.ts +5 -1
  143. package/src/functions/stage.ts +5 -3
  144. package/src/functions/string.ts +3 -2
  145. package/src/functions/table.ts +4 -4
  146. package/src/functions/trinketGive.ts +1 -1
  147. package/src/functions/utils.ts +1 -1
  148. package/src/functions/vector.ts +1 -1
  149. package/src/functions/weighted.ts +2 -2
  150. package/src/index.ts +1 -0
  151. package/src/types/AnyFunction.ts +1 -1
  152. package/src/types/ReadonlyRecord.ts +3 -0
@@ -797,7 +797,7 @@ export declare function addCharge(player: EntityPlayer, activeSlot?: ActiveSlot,
797
797
  * This function is variadic, meaning that you can supply as many collectible types as you want to
798
798
  * add.
799
799
  */
800
- export declare function addCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): void;
800
+ export declare function addCollectible(player: EntityPlayer, ...collectibleTypes: readonly CollectibleType[]): void;
801
801
 
802
802
  export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
803
803
 
@@ -826,7 +826,7 @@ export declare function addCollectibleCostume(player: EntityPlayer, collectibleT
826
826
  * @param flagsToAdd One or more bit flags to add, each as a separate argument.
827
827
  * @returns The combined bit flags.
828
828
  */
829
- export declare function addFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToAdd: T[]): BitFlags<T>;
829
+ export declare function addFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToAdd: readonly T[]): BitFlags<T>;
830
830
 
831
831
  export declare function addPlayerHealthType(player: EntityPlayer, healthType: HealthType, numHearts: int): void;
832
832
 
@@ -981,7 +981,7 @@ export declare function angleToDirection(angleDegrees: int): Direction;
981
981
  export declare type AnyClass = new () => object;
982
982
 
983
983
  /** Alias for the `anySeedEffectEnabled` function. */
984
- export declare function anyEasterEggEnabled(exceptions?: SeedEffect[]): boolean;
984
+ export declare function anyEasterEggEnabled(exceptions?: readonly SeedEffect[]): boolean;
985
985
 
986
986
  /**
987
987
  * A type union that matches `Entity`, `EntityBomb`, `EntityEffect`, and so on.
@@ -996,7 +996,7 @@ export declare function anyEntityCloserThan(entities: readonly Entity[], positio
996
996
  * Helper type to represent any function. This is safer than using the built-in `Function` type, as
997
997
  * it does not completely turn off all type safety.
998
998
  */
999
- export declare type AnyFunction = (...args: unknown[]) => unknown;
999
+ export declare type AnyFunction = (...args: readonly unknown[]) => unknown;
1000
1000
 
1001
1001
  /**
1002
1002
  * A type union that matches `GridEntity`, `GridEntityDoor`, `GridEntityPit`, and so on.
@@ -1053,14 +1053,14 @@ export declare function anyPlayerHoldingItem(): boolean;
1053
1053
  * This function is variadic, meaning that you can supply as many characters as you want to check
1054
1054
  * for. Returns true if any of the characters supplied are present.
1055
1055
  */
1056
- export declare function anyPlayerIs(...matchingCharacters: PlayerType[]): boolean;
1056
+ export declare function anyPlayerIs(...matchingCharacters: readonly PlayerType[]): boolean;
1057
1057
 
1058
1058
  /**
1059
1059
  * Helper function to see if any seed effects (i.e. Easter Eggs) are enabled for the current run.
1060
1060
  *
1061
1061
  * @param exceptions Optional. An array of seed effects to ignore.
1062
1062
  */
1063
- export declare function anySeedEffectEnabled(exceptions?: SeedEffect[]): boolean;
1063
+ export declare function anySeedEffectEnabled(exceptions?: readonly SeedEffect[]): boolean;
1064
1064
 
1065
1065
  declare type Arr<N extends number, T extends unknown[] = []> = T["length"] extends N ? T : Arr<N, [...T, unknown]>;
1066
1066
 
@@ -1129,7 +1129,7 @@ export declare function arrayRemoveIndex<T>(originalArray: readonly T[], ...inde
1129
1129
  *
1130
1130
  * @returns The removed elements. This will be an empty array if no elements were removed.
1131
1131
  */
1132
- export declare function arrayRemoveIndexInPlace<T>(array: T[], ...indexesToRemove: int[]): T[];
1132
+ export declare function arrayRemoveIndexInPlace<T>(array: T[], ...indexesToRemove: readonly int[]): T[];
1133
1133
 
1134
1134
  /**
1135
1135
  * Removes the specified element(s) from the array. If the specified element(s) are not found in the
@@ -1148,7 +1148,7 @@ export declare function arrayRemoveInPlace<T>(array: T[], ...elementsToRemove: r
1148
1148
  /** Helper function to convert a set of flags to a single `BitFlags` object. */
1149
1149
  export declare function arrayToBitFlags<T extends BitFlag | BitFlag128>(array: readonly T[]): BitFlags<T>;
1150
1150
 
1151
- export declare function arrayToString(array: unknown[]): string;
1151
+ export declare function arrayToString(array: readonly unknown[]): string;
1152
1152
 
1153
1153
  /**
1154
1154
  * Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
@@ -1293,7 +1293,7 @@ export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
1293
1293
  * @returns An array containing the average time in milliseconds for each function. (This will also
1294
1294
  * be printed to the log.)
1295
1295
  */
1296
- export declare function benchmark(numTrials: int, ...functions: Array<() => void>): readonly int[];
1296
+ export declare function benchmark(numTrials: int, ...functions: ReadonlyArray<() => void>): readonly int[];
1297
1297
 
1298
1298
  /**
1299
1299
  * Helper function for casting a flag enum value to a `BitFlags` object.
@@ -1763,7 +1763,7 @@ export declare function controllerToString(controller: Controller): string | und
1763
1763
  export declare type ConversionHeartSubType = HeartSubType.SOUL | HeartSubType.BLACK;
1764
1764
 
1765
1765
  /** Helper function to convert an array of bits to the resulting decimal number. */
1766
- export declare function convertBinaryToDecimal(bits: int[]): number;
1766
+ export declare function convertBinaryToDecimal(bits: readonly int[]): number;
1767
1767
 
1768
1768
  /**
1769
1769
  * Helper function to convert a number to an array of bits.
@@ -2144,7 +2144,7 @@ declare class CustomItemPools extends Feature {
2144
2144
  * of the collectible.
2145
2145
  * @public
2146
2146
  */
2147
- registerCustomItemPool(itemPoolTypeCustom: ItemPoolType, collectibles: WeightedArray<CollectibleType>): void;
2147
+ registerCustomItemPool(itemPoolTypeCustom: ItemPoolType, collectibles: Readonly<WeightedArray<CollectibleType>>): void;
2148
2148
  /**
2149
2149
  * Helper function to get a new collectible from a custom item pool created with the
2150
2150
  * `registerCustomItemPool` function. This function has the same format as the
@@ -3868,7 +3868,7 @@ declare class DisableInputs extends Feature {
3868
3868
  * @param buttonActions An array of the actions to action.
3869
3869
  * @public
3870
3870
  */
3871
- disableInputs(key: string, ...buttonActions: ButtonAction[]): void;
3871
+ disableInputs(key: string, ...buttonActions: readonly ButtonAction[]): void;
3872
3872
  /**
3873
3873
  * Helper function to disable all inputs. This is useful because `EntityPlayer.ControlsEnabled`
3874
3874
  * can be changed by the game under certain conditions.
@@ -4396,9 +4396,9 @@ declare class EsauJrDetection extends Feature {
4396
4396
  * Helper function for non-TypeScript users to check if every element in the array is equal to a
4397
4397
  * condition.
4398
4398
  *
4399
- * Internally, this just calls `array.every`.
4399
+ * Internally, this just calls `Array.every`.
4400
4400
  */
4401
- export declare function every<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): boolean;
4401
+ export declare function every<T>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => boolean): boolean;
4402
4402
 
4403
4403
  /**
4404
4404
  * When you enable this feature, many custom commands will be added to the in-game console. See the
@@ -4552,9 +4552,9 @@ export declare function fillLevelWithRedRooms(): void;
4552
4552
  * Helper function for non-TypeScript users to filter the elements in an array. Returns the filtered
4553
4553
  * array.
4554
4554
  *
4555
- * Internally, this just calls `array.filter`.
4555
+ * Internally, this just calls `Array.filter`.
4556
4556
  */
4557
- export declare function filter<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): readonly T[];
4557
+ export declare function filter<T>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => boolean): readonly T[];
4558
4558
 
4559
4559
  /**
4560
4560
  * Helper function to perform a map and a filter at the same time. Similar to `Array.map`, provide a
@@ -4572,9 +4572,9 @@ export declare function filterMap<OldT, NewT>(array: readonly OldT[], func: (ele
4572
4572
  /**
4573
4573
  * Helper function for non-TypeScript users to find an element in an array.
4574
4574
  *
4575
- * Internally, this just calls `array.find`.
4575
+ * Internally, this just calls `Array.find`.
4576
4576
  */
4577
- export declare function find<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): T | undefined;
4577
+ export declare function find<T>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => boolean): T | undefined;
4578
4578
 
4579
4579
  /**
4580
4580
  * Helper function to get a room position that is not overlapping with a grid entity, a heaven door,
@@ -4705,9 +4705,9 @@ export declare const fonts: {
4705
4705
  /**
4706
4706
  * Helper function for non-TypeScript users to iterate over an array.
4707
4707
  *
4708
- * Internally, this just calls `array.forEach`.
4708
+ * Internally, this just calls `Array.forEach`.
4709
4709
  */
4710
- export declare function forEach<T>(array: T[], func: (value: T, index: number, array: T[]) => void): void;
4710
+ export declare function forEach<T>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => void): void;
4711
4711
 
4712
4712
  declare class ForgottenSwitch extends Feature {
4713
4713
  private readonly pressInput;
@@ -5092,7 +5092,7 @@ export declare function getBombs(bombVariant?: BombVariant | -1, subType?: numbe
5092
5092
  *
5093
5093
  * This function is variadic, meaning that you can specify N arguments to get N values.
5094
5094
  */
5095
- export declare function getBooleansFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): readonly boolean[];
5095
+ export declare function getBooleansFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: readonly string[]): readonly boolean[];
5096
5096
 
5097
5097
  /**
5098
5098
  * Helper function to get all of the bosses in the room.
@@ -5374,7 +5374,7 @@ export declare function getClosestPlayer(position: Vector): EntityPlayer;
5374
5374
  * @param referenceVector The vector to compare against.
5375
5375
  * @param vectors The array of vectors to look through.
5376
5376
  */
5377
- export declare function getClosestVectorTo(referenceVector: Vector, vectors: Vector[]): Vector | undefined;
5377
+ export declare function getClosestVectorTo(referenceVector: Vector, vectors: readonly Vector[]): Vector | undefined;
5378
5378
 
5379
5379
  /**
5380
5380
  * Helper function to get the name of a coin, as listed in the "entities2.xml" file. Returns
@@ -5619,7 +5619,7 @@ export declare function getDoorEnterPosition(door: GridEntityDoor): Readonly<Vec
5619
5619
  *
5620
5620
  * @allowEmptyVariadic
5621
5621
  */
5622
- export declare function getDoors(...roomTypes: RoomType[]): readonly GridEntityDoor[];
5622
+ export declare function getDoors(...roomTypes: readonly RoomType[]): readonly GridEntityDoor[];
5623
5623
 
5624
5624
  /**
5625
5625
  * Helper function to get the position that a player will enter a room at corresponding to a door
@@ -5649,7 +5649,7 @@ export declare function getDoorSlotsForRoomShape(roomShape: RoomShape): Readonly
5649
5649
  * This function is variadic, meaning that you can specify N arguments to return all of the doors
5650
5650
  * that match any of the N room grid indexes.
5651
5651
  */
5652
- export declare function getDoorsToRoomIndex(...roomGridIndex: int[]): readonly GridEntityDoor[];
5652
+ export declare function getDoorsToRoomIndex(...roomGridIndex: readonly int[]): readonly GridEntityDoor[];
5653
5653
 
5654
5654
  /**
5655
5655
  * Helper function to account for Repentance floors being offset by 1. For example, Downpour 2 is
@@ -5922,7 +5922,7 @@ export declare function getFirstPill(player: EntityPlayer): PocketItemDescriptio
5922
5922
  * use the reverse mapping to find the associated key of a given enum value. Use this helper
5923
5923
  * function instead of indexing the enum directly.)
5924
5924
  */
5925
- export declare function getFlagName<T extends BitFlag | BitFlag128>(flag: BitFlag, flagEnum: Record<string, T>): string | undefined;
5925
+ export declare function getFlagName<T extends BitFlag | BitFlag128>(flag: BitFlag, flagEnum: ReadonlyRecord<string, T>): string | undefined;
5926
5926
 
5927
5927
  /**
5928
5928
  * Helper function to get the minimap `DisplayFlag` value for every room on the floor. Returns a map
@@ -5983,7 +5983,7 @@ export declare function getGotoCommand(roomType: RoomType, roomVariant: int, use
5983
5983
  *
5984
5984
  * @allowEmptyVariadic
5985
5985
  */
5986
- export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): readonly GridEntity[];
5986
+ export declare function getGridEntities(...gridEntityTypes: readonly GridEntityType[]): readonly GridEntity[];
5987
5987
 
5988
5988
  /**
5989
5989
  * Helper function to get every grid entity in the current room except for certain specific types.
@@ -5991,7 +5991,7 @@ export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): r
5991
5991
  * This function is variadic, meaning that you can specify as many grid entity types as you want to
5992
5992
  * exclude.
5993
5993
  */
5994
- export declare function getGridEntitiesExcept(...gridEntityTypes: GridEntityType[]): readonly GridEntity[];
5994
+ export declare function getGridEntitiesExcept(...gridEntityTypes: readonly GridEntityType[]): readonly GridEntity[];
5995
5995
 
5996
5996
  /** Helper function to get all grid entities in a given radius around a given point. */
5997
5997
  export declare function getGridEntitiesInRadius(targetPosition: Vector, radius: number): readonly GridEntity[];
@@ -6005,7 +6005,7 @@ export declare function getGridEntitiesInRadius(targetPosition: Vector, radius:
6005
6005
  *
6006
6006
  * @allowEmptyVariadic
6007
6007
  */
6008
- export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[]): ReadonlyMap<int, GridEntity>;
6008
+ export declare function getGridEntitiesMap(...gridEntityTypes: readonly GridEntityType[]): ReadonlyMap<int, GridEntity>;
6009
6009
 
6010
6010
  /** Helper function to get the ANM2 path for a grid entity type. */
6011
6011
  export declare function getGridEntityANM2Path(gridEntityType: GridEntityType): string | undefined;
@@ -6077,7 +6077,7 @@ export declare function getHeartsUIWidth(): int;
6077
6077
  * Helper function to get the highest value in an array. Returns undefined if there were no elements
6078
6078
  * in the array.
6079
6079
  */
6080
- export declare function getHighestArrayElement(array: number[]): number | undefined;
6080
+ export declare function getHighestArrayElement(array: readonly number[]): number | undefined;
6081
6081
 
6082
6082
  /**
6083
6083
  * Helper function to get the enum value with the highest value.
@@ -6276,7 +6276,7 @@ export declare function getLevelName(stage?: LevelStage, stageType?: StageType):
6276
6276
  * Helper function to get the lowest value in an array. Returns undefined if there were no elements
6277
6277
  * in the array.
6278
6278
  */
6279
- export declare function getLowestArrayElement(array: number[]): number | undefined;
6279
+ export declare function getLowestArrayElement(array: readonly number[]): number | undefined;
6280
6280
 
6281
6281
  /**
6282
6282
  * Helper function to get the enum value with the lowest value.
@@ -6499,7 +6499,7 @@ export declare function getNPCs(entityType?: EntityType | -1, variant?: number,
6499
6499
  *
6500
6500
  * This function is variadic, meaning that you can specify N arguments to get N values.
6501
6501
  */
6502
- export declare function getNumbersFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): readonly number[];
6502
+ export declare function getNumbersFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: readonly string[]): readonly number[];
6503
6503
 
6504
6504
  /** Helper function to get the number of bits in a binary representation of a number. */
6505
6505
  export declare function getNumBitsOfN(n: int): int;
@@ -6533,7 +6533,7 @@ export declare function getNumRooms(): int;
6533
6533
  * @returns If a match was found, returns a tuple of the map key and value. If a match was not
6534
6534
  * found, returns undefined.
6535
6535
  */
6536
- export declare function getObjectPartialMatch<T>(searchText: string, object: Record<string, T>): [string, T] | undefined;
6536
+ export declare function getObjectPartialMatch<T>(searchText: string, object: ReadonlyRecord<string, T>): [string, T] | undefined;
6537
6537
 
6538
6538
  /**
6539
6539
  * Returns the slot number corresponding to where a trinket can be safely inserted.
@@ -6712,7 +6712,7 @@ export declare function getPlayerCloserThan(position: Vector, distance: float):
6712
6712
  *
6713
6713
  * Note that this will filter out non-real collectibles like Lilith's Incubus.
6714
6714
  */
6715
- export declare function getPlayerCollectibleCount(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): int;
6715
+ export declare function getPlayerCollectibleCount(player: EntityPlayer, ...collectibleTypes: readonly CollectibleType[]): int;
6716
6716
 
6717
6717
  /** Helper function to get only the familiars that belong to a specific player. */
6718
6718
  export declare function getPlayerFamiliars(player: EntityPlayer): readonly EntityFamiliar[];
@@ -6849,7 +6849,7 @@ export declare function getPlayers(performCharacterExclusions?: boolean): readon
6849
6849
  * This function is variadic, meaning that you can supply as many characters as you want to check
6850
6850
  * for. Returns true if any of the characters supplied are present.
6851
6851
  */
6852
- export declare function getPlayersOfType(...characters: PlayerType[]): readonly EntityPlayer[];
6852
+ export declare function getPlayersOfType(...characters: readonly PlayerType[]): readonly EntityPlayer[];
6853
6853
 
6854
6854
  /**
6855
6855
  * Helper function to get all of the players that are using keyboard (i.e.
@@ -6883,7 +6883,7 @@ export declare function getPlayerStats(player: EntityPlayer): PlayerStats;
6883
6883
  * This function is variadic, meaning that you can supply as many collectible types as you want to
6884
6884
  * check for. It only returns the players that have all of the collectibles.
6885
6885
  */
6886
- export declare function getPlayersWithCollectible(...collectibleTypes: CollectibleType[]): readonly EntityPlayer[];
6886
+ export declare function getPlayersWithCollectible(...collectibleTypes: readonly CollectibleType[]): readonly EntityPlayer[];
6887
6887
 
6888
6888
  /**
6889
6889
  * Helper function to get all of the players that match the provided controller index. This function
@@ -6901,7 +6901,7 @@ export declare function getPlayersWithControllerIndex(controllerIndex: Controlle
6901
6901
  * This function is variadic, meaning that you can supply as many trinket types as you want to check
6902
6902
  * for. It only returns the players that have all of the trinkets.
6903
6903
  */
6904
- export declare function getPlayersWithTrinket(...trinketTypes: TrinketType[]): readonly EntityPlayer[];
6904
+ export declare function getPlayersWithTrinket(...trinketTypes: readonly TrinketType[]): readonly EntityPlayer[];
6905
6905
 
6906
6906
  /** Returns a set of the player's current transformations. */
6907
6907
  export declare function getPlayerTransformations(player: EntityPlayer): ReadonlySet<PlayerForm>;
@@ -7075,7 +7075,7 @@ export declare function getRandomFloat(min: int, max: int, seedOrRNG: Seed | RNG
7075
7075
  * `RNG.Next` method will be called. If `undefined` is provided, it will default to
7076
7076
  * a random seed.
7077
7077
  */
7078
- export declare function getRandomFromWeightedArray<T>(weightedArray: WeightedArray<T>, seedOrRNG: Seed | RNG | undefined): T;
7078
+ export declare function getRandomFromWeightedArray<T>(weightedArray: Readonly<WeightedArray<T>>, seedOrRNG: Seed | RNG | undefined): T;
7079
7079
 
7080
7080
  /**
7081
7081
  * Get a random index from a `WeightedArray`. (A `WeightedArray` is an array of tuples, where the
@@ -7090,7 +7090,7 @@ export declare function getRandomFromWeightedArray<T>(weightedArray: WeightedArr
7090
7090
  * `RNG.Next` method will be called. If `undefined` is provided, it will default to
7091
7091
  * a random seed.
7092
7092
  */
7093
- export declare function getRandomIndexFromWeightedArray<T>(weightedArray: WeightedArray<T>, seedOrRNG: Seed | RNG | undefined): int;
7093
+ export declare function getRandomIndexFromWeightedArray<T>(weightedArray: Readonly<WeightedArray<T>>, seedOrRNG: Seed | RNG | undefined): int;
7094
7094
 
7095
7095
  /**
7096
7096
  * Returns a random integer between min and max. It is inclusive on both ends.
@@ -7150,7 +7150,7 @@ export declare function getRandomItemPool(seedOrRNG: Seed | RNG | undefined): It
7150
7150
  * @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
7151
7151
  * what the function is doing. Default is false.
7152
7152
  */
7153
- export declare function getRandomJSONEntity(jsonEntities: JSONEntity[], seedOrRNG: Seed | RNG | undefined, verbose?: boolean): JSONEntity;
7153
+ export declare function getRandomJSONEntity(jsonEntities: readonly JSONEntity[], seedOrRNG: Seed | RNG | undefined, verbose?: boolean): JSONEntity;
7154
7154
 
7155
7155
  /**
7156
7156
  * Helper function to get a random JSON room from an array of JSON rooms.
@@ -7388,7 +7388,7 @@ export declare function getRoomDescriptorReadOnly(): Readonly<RoomDescriptor>;
7388
7388
  * This function is variadic, meaning that you can specify N arguments to get the combined room
7389
7389
  * descriptors for N room types.
7390
7390
  */
7391
- export declare function getRoomDescriptorsForType(...roomTypes: RoomType[]): readonly RoomDescriptor[];
7391
+ export declare function getRoomDescriptorsForType(...roomTypes: readonly RoomType[]): readonly RoomDescriptor[];
7392
7392
 
7393
7393
  /**
7394
7394
  * Helper function to get a particular room's minimap display flags (e.g. whether it is visible and
@@ -7431,7 +7431,7 @@ export declare function getRoomGridIndex(): int;
7431
7431
  * This function is variadic, meaning that you can specify N arguments to get the combined grid
7432
7432
  * indexes for N room types.
7433
7433
  */
7434
- export declare function getRoomGridIndexesForType(...roomTypes: RoomType[]): readonly int[];
7434
+ export declare function getRoomGridIndexesForType(...roomTypes: readonly RoomType[]): readonly int[];
7435
7435
 
7436
7436
  /**
7437
7437
  * Helper function to get the item pool type for the current room. For example, this returns
@@ -7917,7 +7917,7 @@ export declare function getStartSeedString(): string;
7917
7917
  *
7918
7918
  * This function is variadic, meaning that you can specify N arguments to get N values.
7919
7919
  */
7920
- export declare function getStringsFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): readonly string[];
7920
+ export declare function getStringsFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: readonly string[]): readonly string[];
7921
7921
 
7922
7922
  /**
7923
7923
  * Helper function to get a parent `EntityPlayer` object for a given `EntitySubPlayer` object. This
@@ -8333,7 +8333,7 @@ export declare function hasArmor(entity: Entity): boolean;
8333
8333
  * This function is variadic, meaning that you can pass as many cards as you want to check for. The
8334
8334
  * function will return true if the player has any of the cards.
8335
8335
  */
8336
- export declare function hasCard(player: EntityPlayer, ...cardTypes: CardType[]): boolean;
8336
+ export declare function hasCard(player: EntityPlayer, ...cardTypes: readonly CardType[]): boolean;
8337
8337
 
8338
8338
  /**
8339
8339
  * Helper function to check to see if a player has one or more collectibles.
@@ -8343,7 +8343,7 @@ export declare function hasCard(player: EntityPlayer, ...cardTypes: CardType[]):
8343
8343
  *
8344
8344
  * This function always passes `false` to the `ignoreModifiers` argument.
8345
8345
  */
8346
- export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): boolean;
8346
+ export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes: readonly CollectibleType[]): boolean;
8347
8347
 
8348
8348
  /**
8349
8349
  * Helper function to check to see if a player has a specific collectible in one or more active
@@ -8353,7 +8353,7 @@ export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes
8353
8353
  * for. This function will return true if the collectible type is located in any of the active slots
8354
8354
  * provided.
8355
8355
  */
8356
- export declare function hasCollectibleInActiveSlot(player: EntityPlayer, collectibleType: CollectibleType, ...activeSlots: ActiveSlot[]): boolean;
8356
+ export declare function hasCollectibleInActiveSlot(player: EntityPlayer, collectibleType: CollectibleType, ...activeSlots: readonly ActiveSlot[]): boolean;
8357
8357
 
8358
8358
  /**
8359
8359
  * Helper function to check if the current floor has a particular curse.
@@ -8363,7 +8363,7 @@ export declare function hasCollectibleInActiveSlot(player: EntityPlayer, collect
8363
8363
  *
8364
8364
  * Under the hood, this function uses the `Level.GetCurses` method.
8365
8365
  */
8366
- export declare function hasCurse(...curses: LevelCurse[]): boolean;
8366
+ export declare function hasCurse(...curses: readonly LevelCurse[]): boolean;
8367
8367
 
8368
8368
  /**
8369
8369
  * Helper function to check if the current room has one or more doors that lead to the given room
@@ -8372,7 +8372,7 @@ export declare function hasCurse(...curses: LevelCurse[]): boolean;
8372
8372
  * This function is variadic, meaning that you can supply as many door types as you want to check
8373
8373
  * for. This function will return true if one or more room types match.
8374
8374
  */
8375
- export declare function hasDoorType(...roomTypes: RoomType[]): boolean;
8375
+ export declare function hasDoorType(...roomTypes: readonly RoomType[]): boolean;
8376
8376
 
8377
8377
  /**
8378
8378
  * Helper function to determine if a particular bit flag is set to true.
@@ -8392,7 +8392,7 @@ export declare function hasDoorType(...roomTypes: RoomType[]): boolean;
8392
8392
  * @param flags The existing set of bit flags.
8393
8393
  * @param flagsToCheck One or more bit flags to check for, each as a separate argument.
8394
8394
  */
8395
- export declare function hasFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToCheck: T[]): boolean;
8395
+ export declare function hasFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToCheck: readonly T[]): boolean;
8396
8396
 
8397
8397
  export declare function hasFlyingTransformation(player: EntityPlayer): boolean;
8398
8398
 
@@ -8402,7 +8402,7 @@ export declare function hasFlyingTransformation(player: EntityPlayer): boolean;
8402
8402
  * This function is variadic, meaning that you can supply as many transformations as you want to
8403
8403
  * check for. Returns true if the player has any of the supplied transformations.
8404
8404
  */
8405
- export declare function hasForm(player: EntityPlayer, ...playerForms: PlayerForm[]): boolean;
8405
+ export declare function hasForm(player: EntityPlayer, ...playerForms: readonly PlayerForm[]): boolean;
8406
8406
 
8407
8407
  /** Helper type to check if an object or class has one or more functions/methods. */
8408
8408
  export declare type HasFunction<T> = Record<string, unknown> extends {
@@ -8471,7 +8471,7 @@ export declare function hasSpectral(player: EntityPlayer): boolean;
8471
8471
  *
8472
8472
  * This function always passes `false` to the `ignoreModifiers` argument.
8473
8473
  */
8474
- export declare function hasTrinket(player: EntityPlayer, ...trinketTypes: TrinketType[]): boolean;
8474
+ export declare function hasTrinket(player: EntityPlayer, ...trinketTypes: readonly TrinketType[]): boolean;
8475
8475
 
8476
8476
  /**
8477
8477
  * Helper function to check if the current room has one or more open door slots that can be used to
@@ -8755,14 +8755,14 @@ export declare function inRedKeyRoom(): boolean;
8755
8755
  *
8756
8756
  * This function is variadic, which means you can pass as many room shapes as you want to match for.
8757
8757
  */
8758
- export declare function inRoomShape(...roomShapes: RoomShape[]): boolean;
8758
+ export declare function inRoomShape(...roomShapes: readonly RoomShape[]): boolean;
8759
8759
 
8760
8760
  /**
8761
8761
  * Helper function to check if the current room matches one of the given room types.
8762
8762
  *
8763
8763
  * This function is variadic, which means you can pass as many room types as you want to match for.
8764
8764
  */
8765
- export declare function inRoomType(...roomTypes: RoomType[]): boolean;
8765
+ export declare function inRoomType(...roomTypes: readonly RoomType[]): boolean;
8766
8766
 
8767
8767
  /**
8768
8768
  * Helper function for checking if the current room is a secret exit that leads to a Repentance
@@ -8859,7 +8859,7 @@ declare interface IsaacAPIClassTypeToType {
8859
8859
  * This is a variadic version of `Input.IsActionPressed`, meaning that you can pass as many buttons
8860
8860
  * as you want to check for. This function will return true if any of the buttons are pressed.
8861
8861
  */
8862
- export declare function isActionPressed(controllerIndex: ControllerIndex, ...buttonActions: ButtonAction[]): boolean;
8862
+ export declare function isActionPressed(controllerIndex: ControllerIndex, ...buttonActions: readonly ButtonAction[]): boolean;
8863
8863
 
8864
8864
  /**
8865
8865
  * Helper function to iterate over all inputs to determine if a specific button is pressed (i.e.
@@ -8868,7 +8868,7 @@ export declare function isActionPressed(controllerIndex: ControllerIndex, ...but
8868
8868
  * This function is variadic, meaning you can pass as many buttons as you want to check for. This
8869
8869
  * function will return true if any of the buttons are pressed.
8870
8870
  */
8871
- export declare function isActionPressedOnAnyInput(...buttonActions: ButtonAction[]): boolean;
8871
+ export declare function isActionPressedOnAnyInput(...buttonActions: readonly ButtonAction[]): boolean;
8872
8872
 
8873
8873
  /**
8874
8874
  * Helper function to check if a player is triggering a specific button (i.e. pressing and releasing
@@ -8878,7 +8878,7 @@ export declare function isActionPressedOnAnyInput(...buttonActions: ButtonAction
8878
8878
  * buttons as you want to check for. This function will return true if any of the buttons are
8879
8879
  * triggered.
8880
8880
  */
8881
- export declare function isActionTriggered(controllerIndex: ControllerIndex, ...buttonActions: ButtonAction[]): boolean;
8881
+ export declare function isActionTriggered(controllerIndex: ControllerIndex, ...buttonActions: readonly ButtonAction[]): boolean;
8882
8882
 
8883
8883
  /**
8884
8884
  * Iterates over all inputs to determine if a specific button is triggered (i.e. held down and then
@@ -8887,7 +8887,7 @@ export declare function isActionTriggered(controllerIndex: ControllerIndex, ...b
8887
8887
  * This function is variadic, meaning you can pass as many buttons as you want to check for. This
8888
8888
  * function will return true if any of the buttons are pressed.
8889
8889
  */
8890
- export declare function isActionTriggeredOnAnyInput(...buttonActions: ButtonAction[]): boolean;
8890
+ export declare function isActionTriggeredOnAnyInput(...buttonActions: readonly ButtonAction[]): boolean;
8891
8891
 
8892
8892
  /** Returns true if the item type in the item config is equal to `ItemType.ACTIVE`. */
8893
8893
  export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
@@ -8997,7 +8997,7 @@ export declare function isArray(object: unknown, ensureContiguousValues?: boolea
8997
8997
  *
8998
8998
  * For example, `[2, 3, 4]` would return true, and `[2, 3, 5]` would return false.
8999
8999
  */
9000
- export declare function isArrayContiguous(array: int[]): boolean;
9000
+ export declare function isArrayContiguous(array: readonly int[]): boolean;
9001
9001
 
9002
9002
  /** Checks if an array is in the provided 2-dimensional array. */
9003
9003
  export declare function isArrayInArray<T>(arrayToMatch: readonly T[], parentArray: ReadonlyArray<readonly T[]>): boolean;
@@ -9248,7 +9248,7 @@ declare type ISCFeatureTupleToClassTuple<T extends ISCFeature[]> = {
9248
9248
  * This function is variadic, meaning that you can supply as many characters as you want to check
9249
9249
  * for. Returns true if the player is any of the supplied characters.
9250
9250
  */
9251
- export declare function isCharacter(player: EntityPlayer, ...characters: PlayerType[]): boolean;
9251
+ export declare function isCharacter(player: EntityPlayer, ...characters: readonly PlayerType[]): boolean;
9252
9252
 
9253
9253
  /** Helper function to test if the provided pickup matches one of the various chest variants. */
9254
9254
  export declare function isChest(pickup: EntityPickup): boolean;
@@ -9646,7 +9646,7 @@ export declare function isKey(pickup: EntityPickup): pickup is EntityPickupKey;
9646
9646
  * This function is variadic, meaning you can pass as many keyboard values as you want to check for.
9647
9647
  * This function will return true if any of the values are pressed.
9648
9648
  */
9649
- export declare function isKeyboardPressed(...keys: Keyboard[]): boolean;
9649
+ export declare function isKeyboardPressed(...keys: readonly Keyboard[]): boolean;
9650
9650
 
9651
9651
  /** Helper function to detect if a variable is of type `EntityKnife`. */
9652
9652
  export declare function isKnife(variable: unknown): variable is EntityKnife;
@@ -9949,7 +9949,7 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
9949
9949
  *
9950
9950
  * This function is variadic, which means you can pass as many room shapes as you want to match for.
9951
9951
  */
9952
- export declare function isRoomShape(roomData: RoomConfig, ...roomShapes: RoomShape[]): boolean;
9952
+ export declare function isRoomShape(roomData: RoomConfig, ...roomShapes: readonly RoomShape[]): boolean;
9953
9953
 
9954
9954
  /**
9955
9955
  * Helper function to see if a given room shape will grant a single charge or a double charge to the
@@ -9964,7 +9964,7 @@ export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
9964
9964
  *
9965
9965
  * This function is variadic, which means you can pass as many room types as you want to match for.
9966
9966
  */
9967
- export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[]): boolean;
9967
+ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: readonly RoomType[]): boolean;
9968
9968
 
9969
9969
  /**
9970
9970
  * Helper function to check if a given room is visible on the minimap.
@@ -10393,9 +10393,9 @@ export declare function iterateTableInOrder<K extends AnyNotNil, V>(luaMap: LuaM
10393
10393
  * Helper function for non-TypeScript users to convert an array to a string with the specified
10394
10394
  * separator.
10395
10395
  *
10396
- * Internally, this just calls `array.join`.
10396
+ * Internally, this just calls `Array.join`.
10397
10397
  */
10398
- export declare function join<T>(array: T[], separator: string): string;
10398
+ export declare function join<T>(array: readonly T[], separator: string): string;
10399
10399
 
10400
10400
  /**
10401
10401
  * Converts a JSON string to a Lua table.
@@ -10637,7 +10637,7 @@ export declare const LEVEL_GRID_ROW_WIDTH = 13;
10637
10637
  * This function is variadic, meaning that you can pass as many boss IDs as you want to check for.
10638
10638
  * It will return true if one or more of the boss IDs are matched.
10639
10639
  */
10640
- export declare function levelHasBossID(...bossIDs: BossID[]): boolean;
10640
+ export declare function levelHasBossID(...bossIDs: readonly BossID[]): boolean;
10641
10641
 
10642
10642
  /**
10643
10643
  * Helper function to check to see if the current floor has one or more of a specific room type in
@@ -10646,7 +10646,7 @@ export declare function levelHasBossID(...bossIDs: BossID[]): boolean;
10646
10646
  * This function is variadic, meaning that you can pass as many room types as you want to check for.
10647
10647
  * This function will return true if any of the room types are found.
10648
10648
  */
10649
- export declare function levelHasRoomType(...roomTypes: RoomType[]): boolean;
10649
+ export declare function levelHasRoomType(...roomTypes: readonly RoomType[]): boolean;
10650
10650
 
10651
10651
  /**
10652
10652
  * Helper function to reset an unlocked door back to a locked state. Doing this is non-trivial
@@ -10726,7 +10726,7 @@ export declare function logDamageFlags(this: void, damageFlags: DamageFlag | Bit
10726
10726
  export declare function logDisplayFlags(this: void, displayFlags: DisplayFlag | BitFlags<DisplayFlag>): void;
10727
10727
 
10728
10728
  /** Helper function for logging an array of specific entities. */
10729
- export declare function logEntities(this: void, entities: Entity[]): void;
10729
+ export declare function logEntities(this: void, entities: readonly Entity[]): void;
10730
10730
 
10731
10731
  /** Helper function to log information about a specific entity. */
10732
10732
  export declare function logEntity(this: void, entity: Entity): void;
@@ -10745,13 +10745,13 @@ export declare function logEntityID(this: void, entity: Entity): void;
10745
10745
  export declare function logError(this: void, msg: string): void;
10746
10746
 
10747
10747
  /** Helper function for logging every flag that is turned on. Useful when debugging. */
10748
- export declare function logFlags<T extends BitFlag | BitFlag128>(this: void, flags: T | BitFlags<T>, flagEnum: Record<string, T>, description?: string): void;
10748
+ export declare function logFlags<T extends BitFlag | BitFlag128>(this: void, flags: T | BitFlags<T>, flagEnum: ReadonlyRecord<string, T>, description?: string): void;
10749
10749
 
10750
10750
  /** Helper function for logging every game state flag that is turned on. Useful when debugging. */
10751
10751
  export declare function logGameStateFlags(this: void): void;
10752
10752
 
10753
10753
  /** Helper function for logging an array of specific grid entities. */
10754
- export declare function logGridEntities(this: void, gridEntities: GridEntity[]): void;
10754
+ export declare function logGridEntities(this: void, gridEntities: readonly GridEntity[]): void;
10755
10755
 
10756
10756
  /** Helper function for log information about a specific grid entity. */
10757
10757
  export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
@@ -10805,7 +10805,7 @@ export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
10805
10805
  * Helper function to log information about the entity that corresponding to one or more pointer
10806
10806
  * hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
10807
10807
  */
10808
- export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
10808
+ export declare function logPtrHashes(this: void, ptrHashes: readonly PtrHash[]): void;
10809
10809
 
10810
10810
  /** Helper function for logging information about the current room. */
10811
10811
  export declare function logRoom(this: void): void;
@@ -10897,9 +10897,9 @@ export declare const MAIN_CHARACTERS: readonly [PlayerType.ISAAC, PlayerType.MAG
10897
10897
  * Helper function for non-TypeScript users to convert all of the elements in an array to something
10898
10898
  * else.
10899
10899
  *
10900
- * Internally, this just calls `array.map`.
10900
+ * Internally, this just calls `Array.map`.
10901
10901
  */
10902
- export declare function map<T, U>(array: T[], func: (value: T, index: number, array: T[]) => U): readonly U[];
10902
+ export declare function map<T, U>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => U): readonly U[];
10903
10903
 
10904
10904
  /**
10905
10905
  * Helper function to make using maps with an type of `PtrHash` easier. Use this instead of the
@@ -10933,7 +10933,7 @@ export declare function mapDeletePlayer(map: Map<PlayerIndex, unknown>, player:
10933
10933
  * }
10934
10934
  * ```
10935
10935
  */
10936
- export declare function mapGetNPC<V>(map: Map<PtrHash, V>, npc: EntityNPC): V | undefined;
10936
+ export declare function mapGetNPC<V>(map: ReadonlyMap<PtrHash, V>, npc: EntityNPC): V | undefined;
10937
10937
 
10938
10938
  /**
10939
10939
  * Helper function to make using maps with an index of `PlayerIndex` easier. Use this instead of the
@@ -10955,19 +10955,19 @@ export declare function mapGetNPC<V>(map: Map<PtrHash, V>, npc: EntityNPC): V |
10955
10955
  * }
10956
10956
  * ```
10957
10957
  */
10958
- export declare function mapGetPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer): V | undefined;
10958
+ export declare function mapGetPlayer<V>(map: ReadonlyMap<PlayerIndex, V>, player: EntityPlayer): V | undefined;
10959
10959
 
10960
10960
  /**
10961
10961
  * Helper function to make using maps with an index of `PtrHash` easier. Use this instead of the
10962
10962
  * `Map.has` method if you have a map of this type.
10963
10963
  */
10964
- export declare function mapHasNPC<V>(map: Map<PtrHash, V>, npc: EntityNPC): boolean;
10964
+ export declare function mapHasNPC<V>(map: ReadonlyMap<PtrHash, V>, npc: EntityNPC): boolean;
10965
10965
 
10966
10966
  /**
10967
10967
  * Helper function to make using maps with an index of `PlayerIndex` easier. Use this instead of the
10968
10968
  * `Map.has` method if you have a map of this type.
10969
10969
  */
10970
- export declare function mapHasPlayer<V>(map: Map<PlayerIndex, V>, player: EntityPlayer): boolean;
10970
+ export declare function mapHasPlayer<V>(map: ReadonlyMap<PlayerIndex, V>, player: EntityPlayer): boolean;
10971
10971
 
10972
10972
  /**
10973
10973
  * All of the collectibles that grant vision on the map.
@@ -11109,7 +11109,7 @@ export declare const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000;
11109
11109
  * object, it will use this map to instantiate a new class. Default is an
11110
11110
  * empty Lua table.
11111
11111
  */
11112
- export declare function merge(oldObject: LuaMap<AnyNotNil, unknown> | Map<AnyNotNil, unknown> | Set<AnyNotNil>, newTable: LuaMap<AnyNotNil, unknown>, traversalDescription: string, classConstructors?: LuaMap<string, AnyClass>): void;
11112
+ export declare function merge(oldObject: Readonly<LuaMap<AnyNotNil, unknown>> | ReadonlyMap<AnyNotNil, unknown> | ReadonlySet<AnyNotNil>, newTable: LuaMap<AnyNotNil, unknown>, traversalDescription: string, classConstructors?: LuaMap<string, AnyClass>): void;
11113
11113
 
11114
11114
  /** If you set `EntityPlayer.ShotSpeed` lower than this value, it will have no effect. */
11115
11115
  export declare const MIN_PLAYER_SHOT_SPEED_STAT = 0.6;
@@ -14428,7 +14428,7 @@ declare class ModdedElementSets extends Feature {
14428
14428
  *
14429
14429
  * @public
14430
14430
  */
14431
- getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): readonly CardType[];
14431
+ getCardTypesOfType(...itemConfigCardTypes: readonly ItemConfigCardType[]): readonly CardType[];
14432
14432
  /**
14433
14433
  * Helper function to get a random card type that matches the provided `ItemConfigCardType`.
14434
14434
  *
@@ -14448,7 +14448,7 @@ declare class ModdedElementSets extends Feature {
14448
14448
  * @param exceptions Optional. An array of cards to not select.
14449
14449
  * @public
14450
14450
  */
14451
- getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG: Seed | RNG | undefined, exceptions?: CardType[]): CardType;
14451
+ getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG: Seed | RNG | undefined, exceptions?: readonly CardType[]): CardType;
14452
14452
  /**
14453
14453
  * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
14454
14454
  *
@@ -14470,7 +14470,7 @@ declare class ModdedElementSets extends Feature {
14470
14470
  * @param exceptions Optional. An array of cards to not select.
14471
14471
  * @public
14472
14472
  */
14473
- getRandomCard(seedOrRNG: Seed | RNG | undefined, exceptions?: CardType[]): CardType;
14473
+ getRandomCard(seedOrRNG: Seed | RNG | undefined, exceptions?: readonly CardType[]): CardType;
14474
14474
  /**
14475
14475
  * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
14476
14476
  * of Isaac, etc.). This will never return a Rune Shard.
@@ -14489,7 +14489,7 @@ declare class ModdedElementSets extends Feature {
14489
14489
  * @param exceptions Optional. An array of runes to not select.
14490
14490
  * @public
14491
14491
  */
14492
- getRandomRune(seedOrRNG: Seed | RNG | undefined, exceptions?: CardType[]): CardType;
14492
+ getRandomRune(seedOrRNG: Seed | RNG | undefined, exceptions?: readonly CardType[]): CardType;
14493
14493
  }
14494
14494
 
14495
14495
  /**
@@ -14541,7 +14541,7 @@ export declare class ModFeature {
14541
14541
  * ) => boolean;
14542
14542
  * ```
14543
14543
  */
14544
- protected shouldCallbackMethodsFire: (<T extends boolean>(vanilla: T, modCallback: T extends true ? ModCallback : ModCallbackCustom, ...callbackArgs: unknown[]) => boolean) | null;
14544
+ protected shouldCallbackMethodsFire: (<T extends boolean>(vanilla: T, modCallback: T extends true ? ModCallback : ModCallbackCustom, ...callbackArgs: readonly unknown[]) => boolean) | null;
14545
14545
  /**
14546
14546
  * Whether the feature has registered its callbacks yet.
14547
14547
  *
@@ -14990,7 +14990,7 @@ export declare function onCathedral(): boolean;
14990
14990
  * This function is variadic, meaning that you can specify as many challenges as you want to check
14991
14991
  * for.
14992
14992
  */
14993
- export declare function onChallenge(...challenges: Challenge[]): boolean;
14993
+ export declare function onChallenge(...challenges: readonly Challenge[]): boolean;
14994
14994
 
14995
14995
  export declare function onChest(): boolean;
14996
14996
 
@@ -15004,7 +15004,7 @@ export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
15004
15004
  *
15005
15005
  * This function is variadic, which means you can pass as many stages as you want to match for.
15006
15006
  */
15007
- export declare function onEffectiveStage(...effectiveStages: LevelStage[]): boolean;
15007
+ export declare function onEffectiveStage(...effectiveStages: readonly LevelStage[]): boolean;
15008
15008
 
15009
15009
  /**
15010
15010
  * Returns whether the player is on the "final floor" of the particular run. The final floor is
@@ -15107,7 +15107,7 @@ export declare function onSheol(): boolean;
15107
15107
  *
15108
15108
  * This function is variadic, which means you can pass as many stages as you want to match for.
15109
15109
  */
15110
- export declare function onStage(...stages: LevelStage[]): boolean;
15110
+ export declare function onStage(...stages: readonly LevelStage[]): boolean;
15111
15111
 
15112
15112
  /** Helper function to check if the current stage is equal to or higher than the given stage. */
15113
15113
  export declare function onStageOrHigher(stage: LevelStage): boolean;
@@ -15120,7 +15120,7 @@ export declare function onStageOrLower(stage: LevelStage): boolean;
15120
15120
  *
15121
15121
  * This function is variadic, which means you can pass as many room types as you want to match for.
15122
15122
  */
15123
- export declare function onStageType(...stageTypes: StageType[]): boolean;
15123
+ export declare function onStageType(...stageTypes: readonly StageType[]): boolean;
15124
15124
 
15125
15125
  /**
15126
15126
  * Helper function to check if the current stage is one that has the possibility to grant a natural
@@ -15974,6 +15974,8 @@ declare interface ReadonlyMapConstructor {
15974
15974
  readonly prototype: ReadonlyMap<any, any>;
15975
15975
  }
15976
15976
 
15977
+ export declare type ReadonlyRecord<K extends string | number | symbol, V> = Readonly<Record<K, V>>;
15978
+
15977
15979
  /** An alias for the `Set` constructor that returns a read-only set. */
15978
15980
  declare const ReadonlySet_2: ReadonlySetConstructor;
15979
15981
  export { ReadonlySet_2 as ReadonlySet }
@@ -16006,7 +16008,7 @@ declare interface ReadonlySetConstructor {
16006
16008
  *
16007
16009
  * @see https://github.com/Rchardon/RebirthItemTracker
16008
16010
  */
16009
- export declare function rebirthItemTrackerRemoveCollectible(...collectibleTypes: CollectibleType[]): void;
16011
+ export declare function rebirthItemTrackerRemoveCollectible(...collectibleTypes: readonly CollectibleType[]): void;
16010
16012
 
16011
16013
  /**
16012
16014
  * Helper function to let the Rebirth Item Tracker know that it should write the submitted text
@@ -16132,7 +16134,7 @@ export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVaria
16132
16134
  * @returns The number of doors removed.
16133
16135
  * @allowEmptyVariadic
16134
16136
  */
16135
- export declare function removeAllDoors(...roomTypes: RoomType[]): int;
16137
+ export declare function removeAllDoors(...roomTypes: readonly RoomType[]): int;
16136
16138
 
16137
16139
  /**
16138
16140
  * Helper function to remove all of the effects in the room.
@@ -16176,7 +16178,7 @@ export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant | -
16176
16178
  *
16177
16179
  * @returns The grid entities that were removed.
16178
16180
  */
16179
- export declare function removeAllGridEntitiesExcept(...gridEntityTypes: GridEntityType[]): readonly GridEntity[];
16181
+ export declare function removeAllGridEntitiesExcept(...gridEntityTypes: readonly GridEntityType[]): readonly GridEntity[];
16180
16182
 
16181
16183
  /**
16182
16184
  * Helper function to remove all of the heart pickup entities in the room.
@@ -16253,7 +16255,7 @@ export declare function removeAllMatchingEntities(entityType: EntityType, entity
16253
16255
  *
16254
16256
  * @returns An array of the grid entities removed.
16255
16257
  */
16256
- export declare function removeAllMatchingGridEntities(...gridEntityType: GridEntityType[]): readonly GridEntity[];
16258
+ export declare function removeAllMatchingGridEntities(...gridEntityType: readonly GridEntityType[]): readonly GridEntity[];
16257
16259
 
16258
16260
  /**
16259
16261
  * Helper function to remove all of the NPCs in the room.
@@ -16486,7 +16488,7 @@ export declare function removeCharactersBefore(string: string, substring: string
16486
16488
  * This function is variadic, meaning that you can supply as many collectible types as you want to
16487
16489
  * remove.
16488
16490
  */
16489
- export declare function removeCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): void;
16491
+ export declare function removeCollectible(player: EntityPlayer, ...collectibleTypes: readonly CollectibleType[]): void;
16490
16492
 
16491
16493
  /**
16492
16494
  * Helper function to remove a collectible costume from a player. Use this helper function to avoid
@@ -16501,14 +16503,14 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
16501
16503
  * This function is variadic, meaning that you can specify as many collectibles as you want to
16502
16504
  * remove.
16503
16505
  */
16504
- export declare function removeCollectibleFromAllPlayers(...collectibleTypes: CollectibleType[]): void;
16506
+ export declare function removeCollectibleFromAllPlayers(...collectibleTypes: readonly CollectibleType[]): void;
16505
16507
 
16506
16508
  /**
16507
16509
  * Helper function to remove one or more collectibles from all item pools.
16508
16510
  *
16509
16511
  * This function is variadic, meaning you can pass as many collectible types as you want to remove.
16510
16512
  */
16511
- export declare function removeCollectibleFromPools(...collectibleTypes: CollectibleType[]): void;
16513
+ export declare function removeCollectibleFromPools(...collectibleTypes: readonly CollectibleType[]): void;
16512
16514
 
16513
16515
  /**
16514
16516
  * Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
@@ -16532,7 +16534,7 @@ export declare function removeDoor(door: GridEntityDoor): void;
16532
16534
  *
16533
16535
  * This function is variadic, meaning that you can specify as many doors as you want to remove.
16534
16536
  */
16535
- export declare function removeDoors(...doors: GridEntityDoor[]): void;
16537
+ export declare function removeDoors(...doors: readonly GridEntityDoor[]): void;
16536
16538
 
16537
16539
  /**
16538
16540
  * Helper function to remove all of the entities in the supplied array.
@@ -16569,7 +16571,7 @@ export declare function removeEntitiesSpawnedFromGridEntity(entities: readonly E
16569
16571
  * @param flagsToRemove One or more bit flags to remove, each as a separate argument.
16570
16572
  * @returns The combined bit flags.
16571
16573
  */
16572
- export declare function removeFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToRemove: T[]): BitFlags<T>;
16574
+ export declare function removeFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToRemove: readonly T[]): BitFlags<T>;
16573
16575
 
16574
16576
  /**
16575
16577
  * Helper function to remove all of the grid entities in the supplied array.
@@ -16610,7 +16612,7 @@ export declare function removeNonAlphanumericCharacters(str: string): string;
16610
16612
  *
16611
16613
  * This function is variadic, meaning that you can pass as many substrings as you want to remove.
16612
16614
  */
16613
- export declare function removeSubstring(string: string, ...substrings: string[]): string;
16615
+ export declare function removeSubstring(string: string, ...substrings: readonly string[]): string;
16614
16616
 
16615
16617
  /**
16616
16618
  * Helper function to remove a trinket costume from a player. Use this helper function to avoid
@@ -16623,7 +16625,7 @@ export declare function removeTrinketCostume(player: EntityPlayer, trinketType:
16623
16625
  *
16624
16626
  * This function is variadic, meaning you can pass as many trinket types as you want to remove.
16625
16627
  */
16626
- export declare function removeTrinketFromPools(...trinketTypes: TrinketType[]): void;
16628
+ export declare function removeTrinketFromPools(...trinketTypes: readonly TrinketType[]): void;
16627
16629
 
16628
16630
  /**
16629
16631
  * Helper function to remove all coins, trinkets, and so on that spawned from breaking an urn.
@@ -17346,7 +17348,7 @@ declare class SaveDataManager extends Feature {
17346
17348
  *
17347
17349
  * @public
17348
17350
  */
17349
- saveDataManagerRegisterClass(...tstlClasses: AnyClass[]): void;
17351
+ saveDataManagerRegisterClass(...tstlClasses: readonly AnyClass[]): void;
17350
17352
  /**
17351
17353
  * Removes a previously registered key from the save data manager. This is the opposite of the
17352
17354
  * "saveDataManager" method.
@@ -17575,13 +17577,13 @@ export declare function setAllDisplayFlags(displayFlags: BitFlags<DisplayFlag>):
17575
17577
  * Helper function to iterate over the provided object and set the seed for all of the values that
17576
17578
  * are RNG objects equal to a particular seed.
17577
17579
  */
17578
- export declare function setAllRNGToSeed(object: unknown, seed: Seed): void;
17580
+ export declare function setAllRNGToSeed(object: ReadonlyRecord<string, RNG>, seed: Seed): void;
17579
17581
 
17580
17582
  /**
17581
17583
  * Helper function to iterate over the provided object and set the seed for all of the values that
17582
17584
  * are RNG objects equal to the start seed for the current run.
17583
17585
  */
17584
- export declare function setAllRNGToStartSeed(object: unknown): void;
17586
+ export declare function setAllRNGToStartSeed(object: ReadonlyRecord<string, RNG>): void;
17585
17587
 
17586
17588
  /** Helper function to set the backdrop (i.e. background) of the current room. */
17587
17589
  export declare function setBackdrop(backdropType: BackdropType): void;
@@ -17735,7 +17737,7 @@ export declare function setEntityVelocities(entityVelocities: ReadonlyMap<PtrHas
17735
17737
  *
17736
17738
  * @param displayFlagsMap A map of the display flags that is indexed by the room's safe grid index.
17737
17739
  */
17738
- export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<DisplayFlag>>): void;
17740
+ export declare function setFloorDisplayFlags(displayFlagsMap: ReadonlyMap<int, BitFlags<DisplayFlag>>): void;
17739
17741
 
17740
17742
  /**
17741
17743
  * Helper function to make a grid entity invisible. This is accomplished by resetting the sprite.
@@ -17768,13 +17770,13 @@ export declare function setHas<T>(set: ReadonlySet<T>, ...elements: readonly T[]
17768
17770
  * Helper function to make using sets with an type of `PtrHash` easier. Use this instead of the
17769
17771
  * `Set.has` method if you have a set of this type.
17770
17772
  */
17771
- export declare function setHasNPC(set: Set<PtrHash>, npc: EntityNPC): boolean;
17773
+ export declare function setHasNPC(set: ReadonlySet<PtrHash>, npc: EntityNPC): boolean;
17772
17774
 
17773
17775
  /**
17774
17776
  * Helper function to make using sets with an type of `PlayerIndex` easier. Use this instead of the
17775
17777
  * `Set.has` method if you have a set of this type.
17776
17778
  */
17777
- export declare function setHasPlayer(set: Set<PlayerIndex>, player: EntityPlayer): boolean;
17779
+ export declare function setHasPlayer(set: ReadonlySet<PlayerIndex>, player: EntityPlayer): boolean;
17778
17780
 
17779
17781
  /**
17780
17782
  * Converts every `isaacscript-common` function that begins with "log" to a global function.
@@ -18094,15 +18096,15 @@ export declare function smeltTrinket(player: EntityPlayer, trinketType: TrinketT
18094
18096
  * @param player The player to smelt the trinkets to.
18095
18097
  * @param trinketTypes The trinket types to smelt.
18096
18098
  */
18097
- export declare function smeltTrinkets(player: EntityPlayer, ...trinketTypes: TrinketType[]): void;
18099
+ export declare function smeltTrinkets(player: EntityPlayer, ...trinketTypes: readonly TrinketType[]): void;
18098
18100
 
18099
18101
  /**
18100
18102
  * Helper function for non-TypeScript users to check if one or more elements in the array is equal
18101
18103
  * to a condition.
18102
18104
  *
18103
- * Internally, this just calls `array.some`.
18105
+ * Internally, this just calls `Array.some`.
18104
18106
  */
18105
- export declare function some<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): boolean;
18107
+ export declare function some<T>(array: readonly T[], func: (value: T, index: number, array: readonly T[]) => boolean): boolean;
18106
18108
 
18107
18109
  /**
18108
18110
  * Helper function to sort an array of objects by one of the object keys.
@@ -18141,7 +18143,7 @@ export declare function sortObjectArrayByKey(key: string): (a: unknown, b: unkno
18141
18143
  * From:
18142
18144
  * https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
18143
18145
  */
18144
- export declare function sortTwoDimensionalArray<T>(a: T[], b: T[]): -1 | 0 | 1;
18146
+ export declare function sortTwoDimensionalArray<T>(a: readonly T[], b: readonly T[]): -1 | 0 | 1;
18145
18147
 
18146
18148
  export declare type SoulHeartType = HeartSubType.SOUL | HeartSubType.BLACK | HeartSubType.BONE;
18147
18149
 
@@ -18811,7 +18813,7 @@ declare type T_5 = ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_REMOVE;
18811
18813
  * This function is variadic, meaning that you can specify as many arguments as you want to check
18812
18814
  * for.
18813
18815
  */
18814
- export declare function tableHasKeys(luaMap: LuaMap<AnyNotNil, unknown>, ...keys: string[]): boolean;
18816
+ export declare function tableHasKeys(luaMap: LuaMap<AnyNotNil, unknown>, ...keys: readonly string[]): boolean;
18815
18817
 
18816
18818
  /** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
18817
18819
  export declare const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
@@ -18916,7 +18918,7 @@ export declare const TIME_GAME_OPENED: int;
18916
18918
  *
18917
18919
  * @allowEmptyVariadic
18918
18920
  */
18919
- export declare function todo(...args: unknown[]): void;
18921
+ export declare function todo(...args: readonly unknown[]): void;
18920
18922
 
18921
18923
  /**
18922
18924
  * Helper function to log a stack trace to the "log.txt" file, similar to JavaScript's