feat: implement bool polyfills in java

This commit is contained in:
2023-09-24 13:49:37 +03:00
parent f2cd50726d
commit 86b206051d
8 changed files with 35 additions and 24 deletions

View File

@@ -1,12 +0,0 @@
define("values/boolean", () => {
var Boolean = env.global.Boolean = function (this: Boolean | undefined, arg) {
var val;
if (arguments.length === 0) val = false;
else val = !!arg;
if (this === undefined || this === null) return val;
else (this as any).value = val;
} as BooleanConstructor;
env.setProto('bool', Boolean.prototype);
setConstr(Boolean.prototype, Boolean);
});