MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / Update

Class Update

modules/io/update/esp32/update-esp32.js:1–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Update extends Native("xs_update_destructor") {
2 constructor() {throw new TypeError}
3 close() { return native("xs_update_close").call(this); }
4 complete() { return native("xs_update_complete").call(this); }
5
6 write(buffer, byteOffset) { return native("xs_update_write").call(this, buffer, byteOffset); }
7
8 get format() {
9 return "buffer";
10 }
11 set format(value) {
12 if (value != "buffer")
13 throw new RangeError("invalid");
14 }
15
16 static {
17 this.prototype[Symbol.dispose] = this.prototype.close;
18 }
19}
20
21function open(options, prototype) { return native("xs_update_open").call(this, options, prototype); }
22

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected