@girs/gjs 4.0.0-beta.9 → 4.0.0-rc.2

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/console.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @param logDomain the GLib log domain this Console should print
3
+ * with. Defaults to 'Gjs-Console'.
4
+ */
5
+ export function setConsoleLogDomain(logDomain: string): void;
6
+
7
+ /**
8
+ * @param logDomain the GLib log domain this Console should print
9
+ * with. Defaults to 'Gjs-Console'.
10
+ */
11
+ export function getConsoleLogDomain(): string;
12
+
13
+ export declare const DEFAULT_LOG_DOMAIN: string;
14
+
15
+ declare const Console: {
16
+ setConsoleLogDomain: typeof setConsoleLogDomain;
17
+ getConsoleLogDomain: typeof getConsoleLogDomain;
18
+ DEFAULT_LOG_DOMAIN: typeof DEFAULT_LOG_DOMAIN;
19
+ };
20
+
21
+ export default Console;
package/console.js ADDED
@@ -0,0 +1,6 @@
1
+ import Console, { getConsoleLogDomain, setConsoleLogDomain, DEFAULT_LOG_DOMAIN } from 'console';
2
+
3
+ export { getConsoleLogDomain, setConsoleLogDomain, DEFAULT_LOG_DOMAIN }
4
+ export default Console;
5
+
6
+
package/dom.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  */
11
11
 
12
12
  import type GLib from '@girs/glib-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
13
14
 
14
15
  declare global {
15
16
  interface ImportMeta {
@@ -18,14 +19,14 @@ declare global {
18
19
  *
19
20
  * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/ESModules.md#importmetaurl
20
21
  */
21
- readonly url: string;
22
+ url: string; // with readonly this type is incompatible with e.g. https://github.com/vitejs/vite/blob/main/packages/vite/types/importMeta.d.ts
22
23
  }
23
24
 
24
25
  // Timers
25
26
  // See https://gitlab.gnome.org/GNOME/gjs/-/blob/master/modules/esm/_timers.js
26
27
 
27
28
  /**
28
- * @version Gjs 1.71.1
29
+ * @since 1.71.1
29
30
  * @param callback a callback function
30
31
  * @param delay the duration in milliseconds to wait before running callback
31
32
  * @param args arguments to pass to callback
@@ -33,7 +34,7 @@ declare global {
33
34
  function setTimeout(callback: (...args: any[]) => any, delay?: number, ...args: any[]): GLib.Source;
34
35
 
35
36
  /**
36
- * @version Gjs 1.71.1
37
+ * @since 1.71.1
37
38
  * @param callback a callback function
38
39
  * @param delay the duration in milliseconds to wait between calling callback
39
40
  * @param args arguments to pass to callback
@@ -41,13 +42,13 @@ declare global {
41
42
  function setInterval(callback: (...args: any[]) => any, delay?: number, ...args: any[]): GLib.Source;
42
43
 
43
44
  /**
44
- * @version Gjs 1.71.1
45
+ * @since 1.71.1
45
46
  * @param timeout the timeout to clear
46
47
  */
47
48
  function clearTimeout(timeout: GLib.Source): void;
48
49
 
49
50
  /**
50
- * @version Gjs 1.71.1
51
+ * @since 1.71.1
51
52
  * @param timeout the timeout to clear
52
53
  */
53
54
  function clearInterval(timeout: GLib.Source): void;
@@ -217,18 +218,6 @@ declare global {
217
218
  * @param _label unique identifier for this action
218
219
  */
219
220
  timeStamp(_label: string): void;
220
-
221
- // GJS-specific extensions for integrating with GLib structured logging
222
-
223
- /**
224
- * @param logDomain the GLib log domain this Console should print
225
- * with. Defaults to 'Gjs-Console'.
226
- */
227
- setLogDomain(logDomain: string): void;
228
-
229
- logDomain: string;
230
-
231
- interact(): void;
232
221
  }
233
222
 
234
223
  interface TextDecodeOptions {
@@ -247,7 +236,7 @@ declare global {
247
236
  * The TextDecoder interface represents a decoder for a specific text encoding.
248
237
  * It takes a stream of bytes as input and emits a stream of code points.
249
238
  *
250
- * @version Gjs 1.69.2
239
+ * @since 1.69.2
251
240
  */
252
241
  interface TextDecoder {
253
242
  /** A string containing the name of the decoder, that is a string describing the method the TextDecoder will use. */
@@ -276,7 +265,7 @@ declare global {
276
265
  /**
277
266
  * TextEncoder takes a stream of code points as input and emits a stream of bytes.
278
267
  *
279
- * @version Gjs 1.69.2
268
+ * @since 1.69.2
280
269
  */
281
270
  interface TextEncoder {
282
271
  readonly encoding: 'utf-8';
package/gi.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Requires a GObject Introspection namespace, optionally at a specific version.
3
+ * If a version is specified and a different version of the same namespace is
4
+ * already loaded, an error will be thrown.
5
+ *
6
+ * @param namespace The GI namespace to import (e.g. 'Gtk', 'GLib')
7
+ * @param version The version of the namespace (e.g. '4.0', '2.0')
8
+ * @returns The imported namespace module
9
+ */
10
+ export function require(namespace: string, version?: string): any;
11
+
12
+ /**
13
+ * The `gi` module provides a single entry point for importing GObject
14
+ * Introspection namespaces in GJS ESM modules.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import Gi from 'gi';
19
+ * Gi.require('Gtk', '4.0');
20
+ * ```
21
+ *
22
+ * @see https://gjs-docs.gnome.org/gjs/overrides.md#gi-require
23
+ */
24
+ declare const Gi: {
25
+ readonly require: typeof require;
26
+ };
27
+
28
+ export default Gi;
package/gi.js ADDED
@@ -0,0 +1,6 @@
1
+ import Gi, { require } from 'gi';
2
+
3
+ export { require };
4
+ export default Gi;
5
+
6
+
package/gjs-ambient.d.ts CHANGED
@@ -17,3 +17,15 @@ declare module 'cairo' {
17
17
  import Cairo from '@girs/gjs/cairo';
18
18
  export default Cairo;
19
19
  }
20
+
21
+ declare module 'console' {
22
+ import Console, { setConsoleLogDomain, getConsoleLogDomain, DEFAULT_LOG_DOMAIN } from '@girs/gjs/console';
23
+ export { setConsoleLogDomain, getConsoleLogDomain, DEFAULT_LOG_DOMAIN };
24
+ export default Console;
25
+ }
26
+
27
+ declare module 'gi' {
28
+ import Gi, { require } from '@girs/gjs/gi';
29
+ export { require };
30
+ export default Gi;
31
+ }
package/gjs.d.ts CHANGED
@@ -40,24 +40,54 @@ declare namespace package {
40
40
  datadir?: string;
41
41
  }
42
42
 
43
- /** The base name of the entry point (eg. org.foo.Bar.App) */
44
- export const name: string | undefined;
45
- /** The version of the package */
46
- export const version: string | undefined;
47
- /** The prefix of the package */
48
- export const prefix: string | undefined;
49
- /** The final datadir when installed; usually, these would be prefix + '/share' */
50
- export const datadir: string | undefined;
51
- /** The final libdir when installed; usually, these would be prefix + '/lib' (or '/lib64') */
52
- export const libdir: string | undefined;
53
- /** The final pkgdatadir when installed; usually, this would be prefix + '/share' */
54
- export const pkgdatadir: string | undefined;
55
- /** The final pkglibdir when installed; usually, this would be prefix + '/lib' (or '/lib64') */
56
- export const pkglibdir: string | undefined;
57
- /** The final moduledir when installed; usually, this would be prefix + '/lib' (or '/lib64') */
58
- export const moduledir: string | undefined;
59
- /** The directory containing gettext translation files; this will be datadir + '/locale' when installed and './po' in the source tree */
60
- export const localedir: string | undefined;
43
+ /**
44
+ * The base name of the entry point (eg. org.foo.Bar.App)
45
+ *
46
+ * Note: Run `pkg.init()` before accessing this property.
47
+ */
48
+ export const name: string;
49
+ /**
50
+ * The version of the package
51
+ *
52
+ * Note: Run `pkg.init()` before accessing this property.
53
+ */
54
+ export const version: string;
55
+ /**
56
+ * The prefix of the package
57
+ *
58
+ * Note: Run `pkg.init()` before accessing this property.
59
+ */
60
+ export const prefix: string;
61
+ /**
62
+ * The final datadir when installed; usually, these would be prefix + '/share'
63
+ *
64
+ * Note: Run `pkg.init()` before accessing this property.
65
+ */
66
+ export const datadir: string;
67
+ /**
68
+ * The final libdir when installed; usually, these would be prefix + '/lib' (or '/lib64')
69
+ *
70
+ * Note: Run `pkg.init()` before accessing this property.
71
+ */
72
+ export const libdir: string;
73
+ /**
74
+ * The final pkglibdir when installed; usually, this would be prefix + '/lib' (or '/lib64')
75
+ *
76
+ * Note: Run `pkg.init()` before accessing this property.
77
+ */
78
+ export const pkglibdir: string;
79
+ /**
80
+ * The final moduledir when installed; usually, this would be prefix + '/lib' (or '/lib64')
81
+ *
82
+ * Note: Run `pkg.init()` before accessing this property.
83
+ */
84
+ export const moduledir: string;
85
+ /**
86
+ * The directory containing gettext translation files; this will be datadir + '/locale' when installed and './po' in the source tree
87
+ *
88
+ * Note: Run `pkg.init()` before accessing this property.
89
+ */
90
+ export const localedir: string;
61
91
 
62
92
  /**
63
93
  * Initialize directories and global variables. Must be called
@@ -165,7 +195,31 @@ declare namespace package {
165
195
  */
166
196
  export function initGettext(): void;
167
197
  /**
168
- * @deprecated Use JS string interpolation
198
+ * Initializes string formatting capabilities by adding a format() method to String.prototype.
199
+ *
200
+ * After calling this method, you can use a printf-style string formatting by calling
201
+ * the format() method on any string:
202
+ *
203
+ * @example
204
+ * ```ts
205
+ * pkg.initFormat();
206
+ *
207
+ * // Now you can use format() on any string
208
+ * const name = "User";
209
+ * const count = 5;
210
+ * const formatted = "Hello %s, you have %d items".format(name, count);
211
+ * // formatted = "Hello User, you have 5 items"
212
+ *
213
+ * // Format numbers with precision
214
+ * const price = 10.5;
215
+ * const priceStr = "Price: $%.2f".format(price);
216
+ * // priceStr = "Price: $10.50"
217
+ *
218
+ * // Pad with zeros
219
+ * const id = 42;
220
+ * const idStr = "ID: %05d".format(id);
221
+ * // idStr = "ID: 00042"
222
+ * ```
169
223
  */
170
224
  export function initFormat(): void;
171
225
  /**
@@ -220,21 +274,49 @@ declare namespace lang {
220
274
  }
221
275
 
222
276
  declare namespace format {
223
- export function vprintf(str: string, args: string[]): string;
224
- export function printf(fmt: string, ...args: any[]): void;
225
- // Following docs from gjs/modules/format.js
226
277
  /**
227
- * This function is intended to extend the String object and provide
228
- * an String.format API for string formatting.
229
- * It has to be set up using String.prototype.format = Format.format;
230
- * Usage:
231
- * "somestring %s %d".format('hello', 5);
232
- * It supports %s, %d, %x and %f, for %f it also support precisions like
233
- * "%.2f".format(1.526). All specifiers can be prefixed with a minimum
234
- * field width, e.g. "%5s".format("foo"). Unless the width is prefixed
235
- * with '0', the formatted string will be padded with spaces.
278
+ * Formats a string using printf-style format specifiers.
279
+ *
280
+ * @param str The format string
281
+ * @param args The arguments to be formatted
282
+ * @returns The formatted string
283
+ */
284
+ export function vprintf(str: string, args: (string | number | boolean | null | undefined)[]): string;
285
+
286
+ /**
287
+ * Prints a formatted string to the console.
288
+ * Similar to C's printf function.
289
+ *
290
+ * @param fmt The format string
291
+ * @param args The arguments to be formatted
292
+ */
293
+ export function printf(fmt: string, ...args: (string | number | boolean | null | undefined)[]): void;
294
+
295
+ /**
296
+ * Formats a string with the given arguments.
297
+ * This is the implementation that backs String.prototype.format
298
+ * when pkg.initFormat() is called.
299
+ *
300
+ * Supported format specifiers:
301
+ * - %s: Formats as a string
302
+ * - %d: Formats as an integer
303
+ * - %x: Formats as a hexadecimal number
304
+ * - %f: Formats as a floating point number, optionally with precision (e.g. %.2f)
305
+ *
306
+ * All specifiers can be prefixed with a minimum field width, e.g. "%5s" will pad with spaces.
307
+ * If the width is prefixed with '0', it will pad with zeroes instead of spaces.
308
+ *
309
+ * @example
310
+ * ```ts
311
+ * format.format("Hello %s, you have %d items", "User", 5);
312
+ * // Returns: "Hello User, you have 5 items"
313
+ * ```
314
+ *
315
+ * @param fmt The format string
316
+ * @param args The arguments to format the string with
317
+ * @returns The formatted string
236
318
  */
237
- export function format(fmt: string, ...args: any[]): string;
319
+ export function format(fmt: string, ...args: (string | number | boolean | null | undefined)[]): string;
238
320
  }
239
321
 
240
322
  declare namespace mainloop {
@@ -566,17 +648,17 @@ declare global {
566
648
  * Run `pkg.initGettext()` before using this.
567
649
  * See {@link gettext.gettext}
568
650
  */
569
- const _: undefined | typeof gettext.gettext;
651
+ const _: typeof gettext.gettext;
570
652
  /**
571
653
  * Run `pkg.initGettext()` before using this.
572
654
  * See {@link gettext.pgettext}
573
655
  */
574
- const C_: undefined | typeof gettext.pgettext;
656
+ const C_: typeof gettext.pgettext;
575
657
  /**
576
658
  * Run `pkg.initGettext()` before using this.
577
659
  * Currently not implemented.
578
660
  */
579
- const N_: undefined | ((x: string) => string);
661
+ const N_: (x: string) => string;
580
662
 
581
663
  function print(...args: any[]): void;
582
664
  function printerr(...args: any[]): void;
@@ -599,9 +681,66 @@ declare global {
599
681
  $gtype: GObject.GType<string>;
600
682
  }
601
683
 
684
+ interface StringConstructor {
685
+ $gtype: GObject.GType<string>;
686
+ }
687
+
688
+ interface ObjectConstructor {
689
+ $gtype: GObject.GType<Object>;
690
+ }
691
+
602
692
  const imports: GjsImports;
603
693
 
604
694
  const ARGV: string[];
695
+
696
+ interface String {
697
+ /**
698
+ * Formats a string with the given arguments.
699
+ * This method is made available by calling `pkg.initFormat()`.
700
+ *
701
+ * Supported format specifiers:
702
+ * - %s: Formats as a string
703
+ * - %d: Formats as an integer
704
+ * - %x: Formats as a hexadecimal number
705
+ * - %f: Formats as a floating point number, optionally with precision (e.g. %.2f)
706
+ *
707
+ * All specifiers can be prefixed with a minimum field width, e.g. "%5s" will pad with spaces.
708
+ * If the width is prefixed with '0', it will pad with zeroes instead of spaces.
709
+ *
710
+ * @example
711
+ * ```ts
712
+ * // After calling pkg.initFormat()
713
+ * "Hello %s, you have %d items".format("User", 5);
714
+ * // Returns: "Hello User, you have 5 items"
715
+ *
716
+ * "Price: $%.2f".format(10.5);
717
+ * // Returns: "Price: $10.50"
718
+ *
719
+ * "ID: %05d".format(42);
720
+ * // Returns: "ID: 00042"
721
+ * ```
722
+ *
723
+ * @param args The arguments to format the string with
724
+ * @returns The formatted string
725
+ */
726
+ format(...args: (string | number | boolean | null | undefined)[]): string;
727
+ }
728
+
729
+ interface Error {
730
+ /**
731
+ * Checks if this error matches a GLib error domain and code.
732
+ *
733
+ * Added to the global `Error` prototype by the GLib override so that
734
+ * `e.matches(Ns.FooError, Ns.FooError.SOME_CODE)` works without an
735
+ * `instanceof` check. Always returns `false` for standard JavaScript
736
+ * errors; only `GLib.Error` instances provide a meaningful implementation.
737
+ *
738
+ * @param domain A GLib error domain (error class constructor or quark)
739
+ * @param code The error code to match against
740
+ * @returns `false` for native JS errors, `true` if a GLib.Error matches
741
+ */
742
+ matches(domain: unknown, code: number): boolean;
743
+ }
605
744
  }
606
745
 
607
746
  declare const _imports: GjsImports;
package/package.json CHANGED
@@ -1,74 +1,79 @@
1
1
  {
2
- "name": "@girs/gjs",
3
- "version": "4.0.0-beta.9",
4
- "description": "GJS TypeScript type definitions for Gjs",
5
- "type": "module",
6
- "module": "gjs.js",
7
- "main": "gjs.js",
8
- "exports": {
9
- "./ambient": {
10
- "types": "./gjs-ambient.d.ts",
11
- "import": "./gjs-ambient.js",
12
- "default": "./gjs-ambient.js"
2
+ "name": "@girs/gjs",
3
+ "version": "4.0.0-rc.2",
4
+ "description": "GJS TypeScript type definitions for Gjs",
5
+ "type": "module",
6
+ "module": "gjs.js",
7
+ "main": "gjs.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./gjs-ambient.d.ts",
11
+ "import": "./gjs-ambient.js",
12
+ "default": "./gjs-ambient.js"
13
+ },
14
+ "./dom": {
15
+ "types": "./dom.d.ts",
16
+ "import": "./dom.js",
17
+ "default": "./dom.js"
18
+ },
19
+ "./gettext": {
20
+ "types": "./gettext.d.ts",
21
+ "import": "./gettext.js",
22
+ "default": "./gettext.js"
23
+ },
24
+ "./system": {
25
+ "types": "./system.d.ts",
26
+ "import": "./system.js",
27
+ "default": "./system.js"
28
+ },
29
+ "./cairo": {
30
+ "types": "./cairo.d.ts",
31
+ "import": "./cairo.js",
32
+ "default": "./cairo.js"
33
+ },
34
+ "./console": {
35
+ "types": "./console.d.ts",
36
+ "import": "./console.js",
37
+ "default": "./console.js"
38
+ },
39
+ "./gi": {
40
+ "types": "./gi.d.ts",
41
+ "import": "./gi.js",
42
+ "default": "./gi.js"
43
+ },
44
+ "./gjs": {
45
+ "types": "./gjs.d.ts",
46
+ "import": "./gjs.js",
47
+ "default": "./gjs.js"
48
+ },
49
+ ".": {
50
+ "types": "./index.d.ts",
51
+ "import": "./index.js",
52
+ "default": "./index.js"
53
+ }
13
54
  },
14
- "./dom": {
15
- "types": "./dom.d.ts",
16
- "import": "./dom.js",
17
- "default": "./dom.js"
55
+ "scripts": {
56
+ "test": "tsc --project tsconfig.json"
18
57
  },
19
- "./gettext": {
20
- "types": "./gettext.d.ts",
21
- "import": "./gettext.js",
22
- "default": "./gettext.js"
58
+ "dependencies": {
59
+ "@girs/gobject-2.0": "2.88.0-4.0.0-rc.2",
60
+ "@girs/glib-2.0": "2.88.0-4.0.0-rc.2",
61
+ "@girs/gio-2.0": "2.88.0-4.0.0-rc.2",
62
+ "@girs/cairo-1.0": "1.0.0-4.0.0-rc.2" },
63
+ "devDependencies": {
64
+ "typescript": "*"
23
65
  },
24
- "./system": {
25
- "types": "./system.d.ts",
26
- "import": "./system.js",
27
- "default": "./system.js"
66
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "Gjs"],
67
+ "author": "ts-for-gir",
68
+ "license": "MIT",
69
+ "repository": {
70
+ "type": "git",
71
+ "url": "git+https://github.com/gjsify/types.git"
28
72
  },
29
- "./cairo": {
30
- "types": "./cairo.d.ts",
31
- "import": "./cairo.js",
32
- "default": "./cairo.js"
73
+ "bugs": {
74
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
33
75
  },
34
- "./gjs": {
35
- "types": "./gjs.d.ts",
36
- "import": "./gjs.js",
37
- "default": "./gjs.js"
38
- },
39
- ".": {
40
- "types": "./index.d.ts",
41
- "import": "./index.js",
42
- "default": "./index.js"
43
- }
44
- },
45
- "scripts": {
46
- "test": "tsc --project tsconfig.json"
47
- },
48
- "dependencies": {
49
- "@girs/gio-2.0": "^2.80.2-4.0.0-beta.9",
50
- "@girs/glib-2.0": "^2.80.2-4.0.0-beta.9",
51
- "@girs/gobject-2.0": "^2.80.2-4.0.0-beta.9"
52
- },
53
- "devDependencies": {
54
- "typescript": "*"
55
- },
56
- "keywords": [
57
- "Gir",
58
- "TypeScript",
59
- "types",
60
- "GObject-Introspection",
61
- "GJS",
62
- "Gjs"
63
- ],
64
- "author": "ts-for-gir",
65
- "license": "MIT",
66
- "repository": {
67
- "type": "git",
68
- "url": "git+https://github.com/gjsify/ts-for-gir.git"
69
- },
70
- "bugs": {
71
- "url": "https://github.com/gjsify/ts-for-gir/issues"
72
- },
73
- "homepage": "https://github.com/gjsify/types/tree/main/gjs#readme"
74
- }
76
+ "homepage": "https://github.com/gjsify/types/tree/main/gjs#readme"
77
+ }
78
+
79
+
package/system.d.ts CHANGED
@@ -5,7 +5,7 @@ import type GObject from '@girs/gobject-2.0';
5
5
  * line. In C and other languages, this information is contained in the first element of
6
6
  * the platform's equivalent of argv, but GJS's ARGV only contains the
7
7
  * subsequent command-line arguments. In other words, `ARGV[0]` in GJS is the same as `argv[1]` in C.
8
- * @version Gjs 1.68
8
+ * @since 1.68
9
9
  */
10
10
  export const programInvocationName: string;
11
11
 
@@ -16,7 +16,7 @@ export const version: number;
16
16
 
17
17
  /**
18
18
  * The full path of the executed program.
19
- * @version Gjs 1.68
19
+ * @since 1.68
20
20
  */
21
21
  export const programPath: string | null;
22
22
 
@@ -24,7 +24,7 @@ export const programPath: string | null;
24
24
  * A list of arguments passed to the current process.
25
25
  * This is effectively an alias for the global `ARGV`, which is misleading in that
26
26
  * it is not equivalent to the platform'`s` argv.
27
- * @version Gjs 1.68
27
+ * @since 1.68
28
28
  */
29
29
  export const programArgs: string[];
30
30
 
@@ -39,14 +39,14 @@ export const programArgs: string[];
39
39
  * @param o Any Object
40
40
  * @returns A hexadecimal string (e.g. `0xb4f170f0`)
41
41
  */
42
- export function addressOf(o: any): string;
42
+ export function addressOf(o: object): string;
43
43
 
44
44
  /**
45
45
  * Return the memory address of any GObject as a string.
46
46
  * See also {@link addressOf}
47
47
  * @param o Any {@link GObject.Object}-derived instance
48
48
  * @returns A hexadecimal string (e.g. `0xb4f170f0`)
49
- * @version Gjs 1.58
49
+ * @since 1.58
50
50
  */
51
51
  export function addressOfGObject(o: GObject.Object): string;
52
52
 
@@ -110,7 +110,7 @@ export function dumpHeap(path?: string): void;
110
110
  * Dump internal garbage collector statistics. If `path` is not given, GJS will
111
111
  * write the contents to `stdout`.
112
112
  * @param path Optional file path
113
- * @version Gjs 1.70
113
+ * @since 1.70
114
114
  * @example Output:
115
115
  * ```json
116
116
  * {
@@ -145,7 +145,7 @@ export function dumpMemoryInfo(path?: string): void;
145
145
  * returns a non-zero error code, then `make` aborts the build.
146
146
  * @param code An exit code
147
147
  */
148
- export function exit(code: number): void;
148
+ export function exit(code: number): never;
149
149
 
150
150
  /**
151
151
  * The System module provides common low-level facilities such as access to
package/tsconfig.json CHANGED
@@ -15,9 +15,10 @@
15
15
  "removeComments": false,
16
16
  "inlineSourceMap": false,
17
17
  "inlineSources": false,
18
- "newLine": "LF"
19
- },
20
- "include": ["./dom.d.ts","./gjs.d.ts"]
18
+ "newLine": "LF",
19
+ // Show diagnostics
20
+ "diagnostics": true },
21
+ "include": ["./dom.d.ts","./cairo.d.ts","./gettext.d.ts","./system.d.ts","./console.d.ts","./gjs-ambient.d.ts","./gjs.d.ts"]
21
22
  }
22
23
 
23
24
 
package/typedoc.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
- "entryPoints": ["./gjs.d.ts"],
2
+ "entryPoints": ["./gjs.d.ts","./cairo.d.ts","./gettext.d.ts","./system.d.ts","./dom.d.ts","./console.d.ts"],
3
3
  "readme": "./README.md",
4
4
  "name": "Gjs",
5
- "tsconfig": "./tsconfig.json"
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
6
8
  }
7
9