class LoginResponse { /** * login was successful or not */ get success() { return this._data.getInt8(0, true); } set success(v) { return this._data.setInt8(0, v, true); } /** * get the struct representation of the object */ get bytes() { return new Uint8Array(this._ptr); } /** * constructor */ constructor(init = {}, ptr = undefined) { this._size = 1; this._ptr = ptr.buffer || new ArrayBuffer(this._size); this._data = new DataView(this._ptr); for (const key of Object.keys(init)) { this[key] = init[key]; } } } export default LoginResponse