Skip to content

Variable: registerClass()

ts
const registerClass: (ctor: DecodableConstructor) => void;

Register a class so the decoder can reconstruct it from a snapshot. The class must have a static [DECODE_METHOD] that accepts an Encodable snapshot and returns an instance of the class.

Parameters

ParameterTypeDescription
ctorDecodableConstructorThe class constructor to register

Returns

void