Skip to content

PlayerIndex

PlayerIndex = int & object

Defined in: packages/isaacscript-common/src/types/PlayerIndex.ts:15

PlayerIndex is a specific type of number that represents a unique identifier for a player. Mods can signify that data structures handle EntityPlayer by using this type.

For more information, see the documentation for the getPlayerIndex function.

For example:

const playersNameMap = new Map<PlayerIndex, string>();

This type is branded for extra type safety.

readonly __playerIndexBrand: symbol