GObject.Boolean

GObject.Boolean represents the gboolean type in the GObject type system. You can pass this class object to methods taking a GObject.Type.

A gboolean value is an integer numeric value between -2147483648 and 214748364887, that is, a signed 32 bit value, but the only meaningful values are 0 (which is false) and non-zero (which is true). In gjs, it is represented as a JS boolean.

GObject.Boolean is actually an alias to the JS standard Boolean constructor, and whenever you want to represent the gboolean type you can pass Boolean instead.

Creating a new object with new GObject.Boolean returns a false Boolean object.

Calling GObject.Boolean(arg) will coerce the argument to a boolean.