Skip to content

Isaac API Class

getIsaacAPIClassName(object): string | undefined

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:17

Helper function to get the name of a class from the Isaac API. This is contained within the “__type” metatable key.

For example, a Vector class is has a name of “Vector”.

Returns undefined if the object is not of type userdata or if the “__type” metatable key does not exist.

In some cases, Isaac classes can be a read-only. If this is the case, the “__type” field will be prepended with “const “. This function will always strip this prefix, if it exists. For example, the class name returned for “const Vector” will be “Vector”.

unknown

string | undefined


isaacAPIClassEquals(object1, object2, keys): boolean

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:40

Helper function to check if an instantiated Isaac API class is equal to another one of the same type. You must provide the list of keys to check for.

unknown

unknown

readonly string[]

boolean


isBomb(variable): variable is EntityBomb

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:52

Helper function to detect if a variable is of type EntityBomb.

unknown

variable is EntityBomb


isDoor(variable): variable is GridEntityDoor

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:57

Helper function to detect if a variable is of type GridEntityDoor.

unknown

variable is GridEntityDoor


isEffect(variable): variable is EntityEffect

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:62

Helper function to detect if a variable is of type EntityEffect.

unknown

variable is EntityEffect


isEntity(variable): variable is Entity

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:70

Helper function to detect if a variable is of type Entity. This will return false for child classes such as EntityPlayer or EntityTear.

unknown

variable is Entity


isFamiliar(variable): variable is EntityFamiliar

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:75

Helper function to detect if a variable is of type EntityFamiliar.

unknown

variable is EntityFamiliar


isGridEntity(variable): variable is GridEntity

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:80

Helper function to detect if a variable is of type GridEntity.

unknown

variable is GridEntity


isIsaacAPIClass(object): object is IsaacAPIClass

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:89

Helper function to check if something is an instantiated class from the Isaac API. (All classes from the Isaac API have a type of “userdata” in Lua with a metatable key of “__type” equal to the name of the class.)

unknown

object is IsaacAPIClass


isIsaacAPIClassOfType(object, classType): boolean

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:94

unknown

string

boolean


isKnife(variable): variable is EntityKnife

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:106

Helper function to detect if a variable is of type EntityKnife.

unknown

variable is EntityKnife


isLaser(variable): variable is EntityLaser

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:111

Helper function to detect if a variable is of type EntityLaser.

unknown

variable is EntityLaser


isNPC(variable): variable is EntityNPC

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:116

Helper function to detect if a variable is of type EntityNPC.

unknown

variable is EntityNPC


isPickup(variable): variable is EntityPickup

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:121

Helper function to detect if a variable is of type EntityPickup.

unknown

variable is EntityPickup


isPit(variable): variable is GridEntityPit

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:126

Helper function to detect if a variable is of type GridEntityPit.

unknown

variable is GridEntityPit


isPlayer(variable): variable is EntityPlayer

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:131

Helper function to detect if a variable is of type EntityPlayer.

unknown

variable is EntityPlayer


isPoop(variable): variable is GridEntityPoop

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:136

Helper function to detect if a variable is of type GridEntityPoop.

unknown

variable is GridEntityPoop


isPressurePlate(variable): variable is GridEntityPressurePlate

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:141

Helper function to detect if a variable is of type GridEntityPressurePlate.

unknown

variable is GridEntityPressurePlate


isProjectile(variable): variable is EntityProjectile

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:148

Helper function to detect if a variable is of type EntityProjectile.

unknown

variable is EntityProjectile


isRock(variable): variable is GridEntityRock

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:153

Helper function to detect if a variable is of type GridEntityRock.

unknown

variable is GridEntityRock


isSpikes(variable): variable is GridEntitySpikes

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:158

Helper function to detect if a variable is of type GridEntitySpikes.

unknown

variable is GridEntitySpikes


isTear(variable): variable is EntityTear

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:163

Helper function to detect if a variable is of type EntityTear.

unknown

variable is EntityTear


isTNT(variable): variable is GridEntityTNT

Defined in: packages/isaacscript-common/src/functions/isaacAPIClass.ts:168

Helper function to detect if a variable is of type GridEntityTNT.

unknown

variable is GridEntityTNT