This commit is contained in:
2025-05-19 20:36:21 -05:00
commit f5303487be
1865 changed files with 260387 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { Typed } from "../typed.js";
import { Coder } from "./abstract-coder.js";
/**
* @_ignore
*/
export class BooleanCoder extends Coder {
constructor(localName) {
super("bool", "bool", localName, false);
}
defaultValue() {
return false;
}
encode(writer, _value) {
const value = Typed.dereference(_value, "bool");
return writer.writeValue(value ? 1 : 0);
}
decode(reader) {
return !!reader.readValue();
}
}
//# sourceMappingURL=boolean.js.map