@girs/gjs 4.0.0-beta.12 → 4.0.0-beta.14

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/gjs)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gjs)
6
6
 
7
- GJS TypeScript type definitions for Gjs using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.12.
7
+ GJS TypeScript type definitions for Gjs using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.14.
8
8
 
9
9
  [GJS](https://gitlab.gnome.org/GNOME/gjs) is a JavaScript runtime for the GNOME ecosystem. Using GJS and the type definitions in this NPM package, you can build GTK applications in JavaScript or TypeScript with type checking, better autocompletion and inline documentations.
10
10
 
package/cairo.d.ts CHANGED
@@ -10,7 +10,7 @@ declare namespace giCairo {
10
10
  // - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/testCairo.js
11
11
  // - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/modules/cairo-context.cpp
12
12
 
13
- // Re-exported enums
13
+ // START Re-exported enums, copied from cairo-1.0.d.ts
14
14
  export namespace Status {
15
15
  export const $gtype: GObject.GType<Status>;
16
16
  }
@@ -339,6 +339,8 @@ declare namespace giCairo {
339
339
  PART,
340
340
  }
341
341
 
342
+ // END Re-exported enums, copied from cairo-1.0.d.ts
343
+
342
344
  export class Context extends Cairo.Context {
343
345
  constructor(surface: Surface);
344
346
 
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 {
@@ -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 {
package/gjs-ambient.d.ts CHANGED
@@ -17,3 +17,9 @@ 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
+ }
package/gjs.d.ts CHANGED
@@ -599,6 +599,14 @@ declare global {
599
599
  $gtype: GObject.GType<string>;
600
600
  }
601
601
 
602
+ interface StringConstructor {
603
+ $gtype: GObject.GType<string>;
604
+ }
605
+
606
+ interface ObjectConstructor {
607
+ $gtype: GObject.GType<Object>;
608
+ }
609
+
602
610
  const imports: GjsImports;
603
611
 
604
612
  const ARGV: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gjs",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.14",
4
4
  "description": "GJS TypeScript type definitions for Gjs",
5
5
  "type": "module",
6
6
  "module": "gjs.js",
@@ -31,6 +31,11 @@
31
31
  "import": "./cairo.js",
32
32
  "default": "./cairo.js"
33
33
  },
34
+ "./console": {
35
+ "types": "./console.d.ts",
36
+ "import": "./console.js",
37
+ "default": "./console.js"
38
+ },
34
39
  "./gjs": {
35
40
  "types": "./gjs.d.ts",
36
41
  "import": "./gjs.js",
@@ -46,10 +51,10 @@
46
51
  "test": "tsc --project tsconfig.json"
47
52
  },
48
53
  "dependencies": {
49
- "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.12",
50
- "@girs/gio-2.0": "^2.80.3-4.0.0-beta.12",
51
- "@girs/glib-2.0": "^2.80.3-4.0.0-beta.12",
52
- "@girs/gobject-2.0": "^2.80.3-4.0.0-beta.12"
54
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.14",
55
+ "@girs/gio-2.0": "^2.80.3-4.0.0-beta.14",
56
+ "@girs/glib-2.0": "^2.80.3-4.0.0-beta.14",
57
+ "@girs/gobject-2.0": "^2.80.3-4.0.0-beta.14"
53
58
  },
54
59
  "devDependencies": {
55
60
  "typescript": "*"