Skip to content

API Reference / @gtkx/runtime / JsValue

Type Alias: JsValue ​

JsValue = string | number | bigint | boolean | string[] | TypedClass | null

Defined in: packages/runtime/src/value.ts:112

Values accepted when a GObject.Value parameter infers its GType:

  • string: gchararray; boolean: gboolean.
  • number: gint for integers in range, otherwise gdouble.
  • bigint: gint64, or guint64 above its range.
  • string[]: GStrv; wrapper instance: its registered GType.
  • null: NULL gpointer, matching GJS inference; few callees accept it.

Use an explicitly initialized GObject.Value for types inference cannot select, such as guchar or an enumeration.