Checksum function type
CRC field options
Checksum function
Initial value. Default 0
Zero-based index at which to start calculation. Default 0
Getter for custom types. Should return the property value, or undefined
if the type is
unknown.
Setter for custom types. Should return false
if the type is unknown.
String array options
String options.
Create continuous bit mask.
offset of the first bit in the mask, starting with the most significant bit
bit-length of fields
8 | 16 | 32
Use this function to specify the type of the numeric field
enum ErrorType {
Success,
Timeout,
InvalidCommand,
ServerError,
}
const OperationResult = new Struct().UInt8('error', typed<ErrorType>()).compile();
const res = new OperationResult();
res.error = ErrorType.Success;
Generated using TypeDoc
Continuous bit mask.