ts-for-gir icon indicating copy to clipboard operation
ts-for-gir copied to clipboard

Some fields are missing

Open JumpLink opened this issue 7 months ago • 1 comments

@ewlsh for example on Gio.DBusNodeInfo, here are the GIR XML definitions:

<record name="DBusNodeInfo"
            c:type="GDBusNodeInfo"
            version="2.26"
            glib:type-name="GDBusNodeInfo"
            glib:get-type="g_dbus_node_info_get_type"
            c:symbol-prefix="dbus_node_info">
      <field name="ref_count" writable="1">
        <doc xml:space="preserve"
             filename="gio/gdbusintrospection.h"
             line="164">The reference count or -1 if statically allocated.</doc>
        <type name="gint" c:type="gint"/>
      </field>
      <field name="path" writable="1">
        <doc xml:space="preserve"
             filename="gio/gdbusintrospection.h"
             line="165">The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.</doc>
        <type name="utf8" c:type="gchar*"/>
      </field>
      <field name="interfaces" writable="1">
        <doc xml:space="preserve"
             filename="gio/gdbusintrospection.h"
             line="166">A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.</doc>
        <array c:type="GDBusInterfaceInfo**">
          <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
        </array>
      </field>
      <field name="nodes" writable="1">
        <doc xml:space="preserve"
             filename="gio/gdbusintrospection.h"
             line="167">A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.</doc>
        <array c:type="GDBusNodeInfo**">
          <type name="DBusNodeInfo" c:type="GDBusNodeInfo*"/>
        </array>
      </field>
      <field name="annotations" writable="1">
        <doc xml:space="preserve"
             filename="gio/gdbusintrospection.h"
             line="168">A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.</doc>
        <array c:type="GDBusAnnotationInfo**">
          <type name="DBusAnnotationInfo" c:type="GDBusAnnotationInfo*"/>
        </array>
      </field>
...

So the generated class fields should look like this:

export class DBusNodeInfo {
    ...
    ref_count: number;
    path: string;
    interfaces: DBusInterfaceInfo[];
    nodes: DBusNodeInfo[];
    annotations: DBusAnnotationInfo[];
...
}

But currently it is looking like this:

export class DBusNodeInfo {
    ...
    ref_count: number;
    path: string;
    annotations: DBusAnnotationInfo[];
...
}

The Structure members are also in the documentation.

JumpLink avatar Jul 21 '24 12:07 JumpLink