@girs/metatest-17 17.0.0-4.0.0-beta.37

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 ADDED
@@ -0,0 +1,85 @@
1
+
2
+ # MetaTest-17
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/metatest-17)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/metatest-17)
6
+
7
+
8
+ GJS TypeScript type definitions for MetaTest-17, generated from library version 17.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.37.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/metatest-17
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import MetaTest from '@girs/metatest-17';
22
+ ```
23
+
24
+ ### Ambient Modules
25
+
26
+ You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
27
+ For this you need to include `@girs/metatest-17` or `@girs/metatest-17/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/metatest-17'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/metatest-17"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import MetaTest from 'gi://MetaTest?version=17';
49
+ ```
50
+
51
+ ### Global import
52
+
53
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
54
+ For this you need to include `@girs/metatest-17` or `@girs/metatest-17/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/metatest-17'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/metatest-17"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const MetaTest = imports.gi.MetaTest;
76
+ ```
77
+
78
+ ### Bundle
79
+
80
+ Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
81
+
82
+ ## Other packages
83
+
84
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
85
+
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * This template is used to generate the index.d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import './metatest-17-ambient.d.ts';
11
+
12
+ import './metatest-17-import.d.ts';
13
+
14
+ import MetaTest from './metatest-17.js';
15
+ export default MetaTest;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from './metatest-17.js';
4
+ export default MetaTest;
5
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://MetaTest?version=17' {
2
+ import MetaTest17 from '@girs/metatest-17';
3
+ export default MetaTest17;
4
+ }
5
+
6
+ declare module 'gi://MetaTest' {
7
+ import MetaTest17 from 'gi://MetaTest?version=17';
8
+ export default MetaTest17;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type MetaTest17 from '@girs/metatest-17';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ MetaTest: typeof MetaTest17;
6
+ }
7
+ }
8
+
9
+ export default GjsGiImports;
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type xlib from '@girs/xlib-2.0';
14
+ import type xfixes from '@girs/xfixes-4.0';
15
+ import type Mtk from '@girs/mtk-17';
16
+ import type Graphene from '@girs/graphene-1.0';
17
+ import type GObject from '@girs/gobject-2.0';
18
+ import type GLib from '@girs/glib-2.0';
19
+ import type Meta from '@girs/meta-17';
20
+ import type Gio from '@girs/gio-2.0';
21
+ import type GModule from '@girs/gmodule-2.0';
22
+ import type GDesktopEnums from '@girs/gdesktopenums-3.0';
23
+ import type Cogl from '@girs/cogl-17';
24
+ import type GL from '@girs/gl-1.0';
25
+ import type Clutter from '@girs/clutter-17';
26
+ import type Pango from '@girs/pango-1.0';
27
+ import type cairo from 'cairo';
28
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
29
+ import type freetype2 from '@girs/freetype2-2.0';
30
+ import type Atk from '@girs/atk-1.0';
31
+
32
+ export namespace MetaTest {
33
+ /**
34
+ * MetaTest-17
35
+ */
36
+
37
+ export namespace ContextTestType {
38
+ export const $gtype: GObject.GType<ContextTestType>;
39
+ }
40
+
41
+ enum ContextTestType {
42
+ HEADLESS,
43
+ VKMS,
44
+ TEST,
45
+ }
46
+
47
+ export namespace ContextTestFlag {
48
+ export const $gtype: GObject.GType<ContextTestFlag>;
49
+ }
50
+
51
+ enum ContextTestFlag {
52
+ NONE,
53
+ TEST_CLIENT,
54
+ NO_X11,
55
+ NO_ANIMATIONS,
56
+ }
57
+
58
+ export namespace TestRunFlags {
59
+ export const $gtype: GObject.GType<TestRunFlags>;
60
+ }
61
+
62
+ enum TestRunFlags {
63
+ NONE,
64
+ CAN_SKIP,
65
+ }
66
+ namespace ContextTest {
67
+ // Signal signatures
68
+ interface SignalSignatures extends Meta.Context.SignalSignatures {
69
+ 'after-tests': () => void;
70
+ 'before-tests': () => void;
71
+ 'run-tests': () => number;
72
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
73
+ 'notify::nick': (pspec: GObject.ParamSpec) => void;
74
+ 'notify::unsafe-mode': (pspec: GObject.ParamSpec) => void;
75
+ }
76
+
77
+ // Constructor properties interface
78
+
79
+ interface ConstructorProps extends Meta.Context.ConstructorProps {}
80
+ }
81
+
82
+ class ContextTest extends Meta.Context {
83
+ static $gtype: GObject.GType<ContextTest>;
84
+
85
+ /**
86
+ * Compile-time signal type information.
87
+ *
88
+ * This instance property is generated only for TypeScript type checking.
89
+ * It is not defined at runtime and should not be accessed in JS code.
90
+ * @internal
91
+ */
92
+ $signals: ContextTest.SignalSignatures;
93
+
94
+ // Constructors
95
+
96
+ constructor(properties?: Partial<ContextTest.ConstructorProps>, ...args: any[]);
97
+
98
+ _init(...args: any[]): void;
99
+
100
+ // Signals
101
+
102
+ connect<K extends keyof ContextTest.SignalSignatures>(
103
+ signal: K,
104
+ callback: GObject.SignalCallback<this, ContextTest.SignalSignatures[K]>,
105
+ ): number;
106
+ connect(signal: string, callback: (...args: any[]) => any): number;
107
+ connect_after<K extends keyof ContextTest.SignalSignatures>(
108
+ signal: K,
109
+ callback: GObject.SignalCallback<this, ContextTest.SignalSignatures[K]>,
110
+ ): number;
111
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
112
+ emit<K extends keyof ContextTest.SignalSignatures>(
113
+ signal: K,
114
+ ...args: GObject.GjsParameters<ContextTest.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
115
+ ): void;
116
+ emit(signal: string, ...args: any[]): void;
117
+
118
+ // Methods
119
+
120
+ run_tests(flags: TestRunFlags | null): number;
121
+ set_background_color(color: Cogl.Color): void;
122
+ wait_for_x11_display(): void;
123
+ }
124
+
125
+ namespace TestMonitor {
126
+ // Signal signatures
127
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
128
+
129
+ // Constructor properties interface
130
+
131
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
132
+ }
133
+
134
+ class TestMonitor extends GObject.Object {
135
+ static $gtype: GObject.GType<TestMonitor>;
136
+
137
+ /**
138
+ * Compile-time signal type information.
139
+ *
140
+ * This instance property is generated only for TypeScript type checking.
141
+ * It is not defined at runtime and should not be accessed in JS code.
142
+ * @internal
143
+ */
144
+ $signals: TestMonitor.SignalSignatures;
145
+
146
+ // Constructors
147
+
148
+ constructor(properties?: Partial<TestMonitor.ConstructorProps>, ...args: any[]);
149
+
150
+ _init(...args: any[]): void;
151
+
152
+ static ['new'](context: Meta.Context, width: number, height: number, refresh_rate: number): TestMonitor;
153
+
154
+ // Signals
155
+
156
+ connect<K extends keyof TestMonitor.SignalSignatures>(
157
+ signal: K,
158
+ callback: GObject.SignalCallback<this, TestMonitor.SignalSignatures[K]>,
159
+ ): number;
160
+ connect(signal: string, callback: (...args: any[]) => any): number;
161
+ connect_after<K extends keyof TestMonitor.SignalSignatures>(
162
+ signal: K,
163
+ callback: GObject.SignalCallback<this, TestMonitor.SignalSignatures[K]>,
164
+ ): number;
165
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
166
+ emit<K extends keyof TestMonitor.SignalSignatures>(
167
+ signal: K,
168
+ ...args: GObject.GjsParameters<TestMonitor.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
169
+ ): void;
170
+ emit(signal: string, ...args: any[]): void;
171
+
172
+ // Methods
173
+
174
+ destroy(): void;
175
+ }
176
+
177
+ type ContextTestClass = typeof ContextTest;
178
+ type TestMonitorClass = typeof TestMonitor;
179
+ /**
180
+ * Name of the imported GIR library
181
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
182
+ */
183
+ const __name__: string;
184
+ /**
185
+ * Version of the imported GIR library
186
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
187
+ */
188
+ const __version__: string;
189
+ }
190
+
191
+ export default MetaTest;
192
+
193
+ // END
package/metatest-17.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from 'gi://MetaTest?version=17';
4
+ export default MetaTest;
5
+
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@girs/metatest-17",
3
+ "version": "17.0.0-4.0.0-beta.37",
4
+ "description": "GJS TypeScript type definitions for MetaTest-17, generated from library version 17.0.0",
5
+ "type": "module",
6
+ "module": "metatest-17.js",
7
+ "main": "metatest-17.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./metatest-17-ambient.d.ts",
11
+ "import": "./metatest-17-ambient.js",
12
+ "default": "./metatest-17-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./metatest-17-import.d.ts",
16
+ "import": "./metatest-17-import.js",
17
+ "default": "./metatest-17-import.js"
18
+ },
19
+ "./metatest-17": {
20
+ "types": "./metatest-17.d.ts",
21
+ "import": "./metatest-17.js",
22
+ "default": "./metatest-17.js"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js",
27
+ "default": "./index.js"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "test": "tsc --project tsconfig.json"
32
+ },
33
+ "dependencies": {
34
+ "@girs/gjs": "4.0.0-beta.37",
35
+ "@girs/xlib-2.0": "2.0.0-4.0.0-beta.37",
36
+ "@girs/xfixes-4.0": "4.0.0-4.0.0-beta.37",
37
+ "@girs/mtk-17": "17.0.0-4.0.0-beta.37",
38
+ "@girs/graphene-1.0": "1.0.0-4.0.0-beta.37",
39
+ "@girs/gobject-2.0": "2.86.0-4.0.0-beta.37",
40
+ "@girs/glib-2.0": "2.86.0-4.0.0-beta.37",
41
+ "@girs/meta-17": "17.0.0-4.0.0-beta.37",
42
+ "@girs/gio-2.0": "2.86.0-4.0.0-beta.37",
43
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.37",
44
+ "@girs/gdesktopenums-3.0": "3.0.0-4.0.0-beta.37",
45
+ "@girs/cogl-17": "17.0.0-4.0.0-beta.37",
46
+ "@girs/gl-1.0": "1.0.0-4.0.0-beta.37",
47
+ "@girs/clutter-17": "17.0.0-4.0.0-beta.37",
48
+ "@girs/pango-1.0": "1.57.0-4.0.0-beta.37",
49
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.37",
50
+ "@girs/harfbuzz-0.0": "11.5.0-4.0.0-beta.37",
51
+ "@girs/freetype2-2.0": "2.0.0-4.0.0-beta.37",
52
+ "@girs/atk-1.0": "2.58.0-4.0.0-beta.37" },
53
+ "devDependencies": {
54
+ "typescript": "*"
55
+ },
56
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "MetaTest-17"],
57
+ "author": "ts-for-gir",
58
+ "license": "MIT",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/gjsify/types.git"
62
+ },
63
+ "bugs": {
64
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
65
+ },
66
+ "homepage": "https://github.com/gjsify/types/tree/main/metatest-17#readme"
67
+ }
68
+
69
+
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "NodeNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "NodeNext",
10
+ "noEmit": true,
11
+ "noEmitOnError": false,
12
+ "baseUrl": "./",
13
+ "rootDir": ".",
14
+ // General settings for code generation
15
+ "removeComments": false,
16
+ "inlineSourceMap": false,
17
+ "inlineSources": false,
18
+ "newLine": "LF",
19
+ // Show diagnostics
20
+ "diagnostics": true
21
+ },
22
+ "include": ["./metatest-17.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./metatest-17.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "MetaTest-17",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+