From 20ccdf63d3c51ff1eb1c0a55081f61d82515dd91 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/lib/src/injections/glib.ts b/packages/lib/src/injections/glib.ts index c584f9685..26fd9c727 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,13 @@ 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 + }) + ); } {