@gtkx/gir 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/parser.ts +5 -0
- package/src/types.ts +2 -0
package/package.json
CHANGED
package/src/parser.ts
CHANGED
|
@@ -22,6 +22,7 @@ const ARRAY_ELEMENT_PATHS = new Set<string>([
|
|
|
22
22
|
"namespace.bitfield",
|
|
23
23
|
"namespace.class.method",
|
|
24
24
|
"namespace.class.constructor",
|
|
25
|
+
"namespace.class.function",
|
|
25
26
|
"namespace.class.property",
|
|
26
27
|
"namespace.class.signal",
|
|
27
28
|
"namespace.class.glib:signal",
|
|
@@ -31,6 +32,7 @@ const ARRAY_ELEMENT_PATHS = new Set<string>([
|
|
|
31
32
|
"namespace.interface.glib:signal",
|
|
32
33
|
"namespace.class.method.parameters.parameter",
|
|
33
34
|
"namespace.class.constructor.parameters.parameter",
|
|
35
|
+
"namespace.class.function.parameters.parameter",
|
|
34
36
|
"namespace.function.parameters.parameter",
|
|
35
37
|
"namespace.enumeration.member",
|
|
36
38
|
"namespace.bitfield.member",
|
|
@@ -108,6 +110,9 @@ export class GirParser {
|
|
|
108
110
|
constructors: this.parseConstructors(
|
|
109
111
|
Array.isArray(cls.constructor) ? (cls.constructor as Record<string, unknown>[]) : [],
|
|
110
112
|
),
|
|
113
|
+
functions: this.parseFunctions(
|
|
114
|
+
Array.isArray(cls.function) ? (cls.function as Record<string, unknown>[]) : [],
|
|
115
|
+
),
|
|
111
116
|
properties: this.parseProperties(
|
|
112
117
|
Array.isArray(cls.property) ? (cls.property as Record<string, unknown>[]) : [],
|
|
113
118
|
),
|
package/src/types.ts
CHANGED
|
@@ -60,6 +60,8 @@ export interface GirClass {
|
|
|
60
60
|
methods: GirMethod[];
|
|
61
61
|
/** Constructor functions for this class. */
|
|
62
62
|
constructors: GirConstructor[];
|
|
63
|
+
/** Static functions defined on this class. */
|
|
64
|
+
functions: GirFunction[];
|
|
63
65
|
/** Properties defined on this class. */
|
|
64
66
|
properties: GirProperty[];
|
|
65
67
|
/** Signals defined on this class. */
|