Serialization
Functions
Section titled “Functions”copyIsaacAPIClass()
Section titled “copyIsaacAPIClass()”copyIsaacAPIClass<
T>(isaacAPIClass):T
Defined in: packages/isaacscript-common/src/functions/serialization.ts:21
Helper function to generically copy an Isaac API class without knowing what specific type of class it is. (This is used by the save data manager.)
For the list of supported classes, see the CopyableIsaacAPIClassType enum.
Type Parameters
Section titled “Type Parameters”T extends CopyableIsaacAPIClass
Parameters
Section titled “Parameters”isaacAPIClass
Section titled “isaacAPIClass”T
Returns
Section titled “Returns”T
deserializeIsaacAPIClass()
Section titled “deserializeIsaacAPIClass()”deserializeIsaacAPIClass<
SerializedT>(serializedIsaacAPIClass):IsaacAPIClassTypeToType[SerializedT["__kind"]]
Defined in: packages/isaacscript-common/src/functions/serialization.ts:66
Helper function to generically deserialize an Isaac API class without knowing what specific type of class it is. (This is used by the save data manager when reading data from the “save#.dat” file.)
For the list of supported classes, see the CopyableIsaacAPIClassType enum.
Type Parameters
Section titled “Type Parameters”SerializedT
Section titled “SerializedT”SerializedT extends SerializedIsaacAPIClass
Parameters
Section titled “Parameters”serializedIsaacAPIClass
Section titled “serializedIsaacAPIClass”SerializedT
Returns
Section titled “Returns”IsaacAPIClassTypeToType[SerializedT["__kind"]]
isCopyableIsaacAPIClass()
Section titled “isCopyableIsaacAPIClass()”isCopyableIsaacAPIClass(
object):object is CopyableIsaacAPIClass
Defined in: packages/isaacscript-common/src/functions/serialization.ts:110
Helper function to generically check if a given object is a copyable Isaac API class. (This is used by the save data manager when determining what is safe to copy.)
For the list of supported classes, see the CopyableIsaacAPIClassType enum.
Parameters
Section titled “Parameters”object
Section titled “object”unknown
Returns
Section titled “Returns”object is CopyableIsaacAPIClass
isSerializedIsaacAPIClass()
Section titled “isSerializedIsaacAPIClass()”isSerializedIsaacAPIClass(
object):object is SerializedIsaacAPIClass
Defined in: packages/isaacscript-common/src/functions/serialization.ts:124
Helper function to generically check if a given Lua table is a serialized Isaac API class. (This is used by the save data manager when reading data from the “save#.dat” file.)
For the list of supported classes, see the CopyableIsaacAPIClassType enum.
Parameters
Section titled “Parameters”object
Section titled “object”unknown
Returns
Section titled “Returns”object is SerializedIsaacAPIClass
serializeIsaacAPIClass()
Section titled “serializeIsaacAPIClass()”serializeIsaacAPIClass<
T>(isaacAPIClass):IsaacAPIClassTypeToSerializedType[T["__kind"]]
Defined in: packages/isaacscript-common/src/functions/serialization.ts:142
Helper function to generically serialize an Isaac API class without knowing what specific type of class it is. (This is used by the save data manager when writing data to the “save#.dat” file.)
For the list of supported classes, see the CopyableIsaacAPIClassType enum.
Type Parameters
Section titled “Type Parameters”T extends CopyableIsaacAPIClass
Parameters
Section titled “Parameters”isaacAPIClass
Section titled “isaacAPIClass”T
Returns
Section titled “Returns”IsaacAPIClassTypeToSerializedType[T["__kind"]]
