From da2304a27a0a7e6d8c8ebbbe1e2c82527b95f736 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Thu, 5 Sep 2024 08:23:12 +0200 Subject: [PATCH] Add GLib.Error.stack property Fixes #196 --- packages/lib/src/injections/glib.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/lib/src/injections/glib.ts b/packages/lib/src/injections/glib.ts index c584f9685..5eb13e625 100644 --- a/packages/lib/src/injections/glib.ts +++ b/packages/lib/src/injections/glib.ts @@ -19,6 +19,7 @@ import { } from "../gir.js"; import { GirDirection } from "@gi.ts/parser"; import { IntrospectedRecord } from "../gir/class.js"; +import { JSField } from "../gir/property.js"; export default { namespace: "GLib", @@ -96,6 +97,11 @@ export default { Error.constructors = Error.constructors.map(c => fixQuark(c)); Error.members = Error.members.map(m => fixQuark(m)); + Error.fields.push(new JSField({ + name: "stack", + parent: Error, + type: StringType + })); } {