@girs/metatest-18 18.0.0-4.0.0-beta.41

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-18
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/metatest-18)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/metatest-18)
6
+
7
+
8
+ GJS TypeScript type definitions for MetaTest-18, generated from library version 18.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.41.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/metatest-18
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import MetaTest from '@girs/metatest-18';
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-18` or `@girs/metatest-18/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/metatest-18'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/metatest-18"],
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=18';
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-18` or `@girs/metatest-18/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/metatest-18'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/metatest-18"],
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-18-ambient.d.ts';
11
+
12
+ import './metatest-18-import.d.ts';
13
+
14
+ import MetaTest from './metatest-18.js';
15
+ export default MetaTest;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from './metatest-18.js';
4
+ export default MetaTest;
5
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://MetaTest?version=18' {
2
+ import MetaTest18 from '@girs/metatest-18';
3
+ export default MetaTest18;
4
+ }
5
+
6
+ declare module 'gi://MetaTest' {
7
+ import MetaTest18 from 'gi://MetaTest?version=18';
8
+ export default MetaTest18;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type MetaTest18 from '@girs/metatest-18';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ MetaTest: typeof MetaTest18;
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,227 @@
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-18';
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-18';
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-18';
24
+ import type GL from '@girs/gl-1.0';
25
+ import type Clutter from '@girs/clutter-18';
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-18
35
+ */
36
+
37
+ /**
38
+ * @gir-type Enum
39
+ */
40
+ enum ContextTestType {
41
+ HEADLESS,
42
+ VKMS,
43
+ TEST,
44
+ }
45
+
46
+ /**
47
+ * @gir-type Flags
48
+ */
49
+ enum ContextTestFlag {
50
+ NONE,
51
+ TEST_CLIENT,
52
+ NO_X11,
53
+ NO_ANIMATIONS,
54
+ }
55
+
56
+ /**
57
+ * @gir-type Flags
58
+ */
59
+ enum TestRunFlags {
60
+ NONE,
61
+ CAN_SKIP,
62
+ }
63
+
64
+ namespace ContextTest {
65
+ // Signal signatures
66
+ interface SignalSignatures extends Meta.Context.SignalSignatures {
67
+ /**
68
+ * @signal
69
+ * @run-last
70
+ */
71
+ 'after-tests': () => void;
72
+ /**
73
+ * @signal
74
+ * @run-last
75
+ */
76
+ 'before-tests': () => void;
77
+ /**
78
+ * @signal
79
+ * @run-last
80
+ */
81
+ 'run-tests': () => number;
82
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
83
+ 'notify::nick': (pspec: GObject.ParamSpec) => void;
84
+ 'notify::unsafe-mode': (pspec: GObject.ParamSpec) => void;
85
+ }
86
+
87
+ // Constructor properties interface
88
+
89
+ interface ConstructorProps extends Meta.Context.ConstructorProps {}
90
+ }
91
+
92
+ /**
93
+ * @gir-type Class
94
+ */
95
+ class ContextTest extends Meta.Context {
96
+ static $gtype: GObject.GType<ContextTest>;
97
+
98
+ /**
99
+ * Compile-time signal type information.
100
+ *
101
+ * This instance property is generated only for TypeScript type checking.
102
+ * It is not defined at runtime and should not be accessed in JS code.
103
+ * @internal
104
+ */
105
+ $signals: ContextTest.SignalSignatures;
106
+
107
+ // Constructors
108
+
109
+ constructor(properties?: Partial<ContextTest.ConstructorProps>, ...args: any[]);
110
+
111
+ _init(...args: any[]): void;
112
+
113
+ // Signals
114
+
115
+ /** @signal */
116
+ connect<K extends keyof ContextTest.SignalSignatures>(
117
+ signal: K,
118
+ callback: GObject.SignalCallback<this, ContextTest.SignalSignatures[K]>,
119
+ ): number;
120
+ connect(signal: string, callback: (...args: any[]) => any): number;
121
+ /** @signal */
122
+ connect_after<K extends keyof ContextTest.SignalSignatures>(
123
+ signal: K,
124
+ callback: GObject.SignalCallback<this, ContextTest.SignalSignatures[K]>,
125
+ ): number;
126
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
127
+ /** @signal */
128
+ emit<K extends keyof ContextTest.SignalSignatures>(
129
+ signal: K,
130
+ ...args: GObject.GjsParameters<ContextTest.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
131
+ ): void;
132
+ emit(signal: string, ...args: any[]): void;
133
+
134
+ // Methods
135
+
136
+ /**
137
+ * @param flags
138
+ */
139
+ run_tests(flags: TestRunFlags | null): number;
140
+ /**
141
+ * @param color
142
+ */
143
+ set_background_color(color: Cogl.Color): void;
144
+ wait_for_x11_display(): void;
145
+ }
146
+
147
+ namespace TestMonitor {
148
+ // Signal signatures
149
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
150
+
151
+ // Constructor properties interface
152
+
153
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
154
+ }
155
+
156
+ /**
157
+ * @gir-type Class
158
+ */
159
+ class TestMonitor extends GObject.Object {
160
+ static $gtype: GObject.GType<TestMonitor>;
161
+
162
+ /**
163
+ * Compile-time signal type information.
164
+ *
165
+ * This instance property is generated only for TypeScript type checking.
166
+ * It is not defined at runtime and should not be accessed in JS code.
167
+ * @internal
168
+ */
169
+ $signals: TestMonitor.SignalSignatures;
170
+
171
+ // Constructors
172
+
173
+ constructor(properties?: Partial<TestMonitor.ConstructorProps>, ...args: any[]);
174
+
175
+ _init(...args: any[]): void;
176
+
177
+ static ['new'](context: Meta.Context, width: number, height: number, refresh_rate: number): TestMonitor;
178
+
179
+ // Signals
180
+
181
+ /** @signal */
182
+ connect<K extends keyof TestMonitor.SignalSignatures>(
183
+ signal: K,
184
+ callback: GObject.SignalCallback<this, TestMonitor.SignalSignatures[K]>,
185
+ ): number;
186
+ connect(signal: string, callback: (...args: any[]) => any): number;
187
+ /** @signal */
188
+ connect_after<K extends keyof TestMonitor.SignalSignatures>(
189
+ signal: K,
190
+ callback: GObject.SignalCallback<this, TestMonitor.SignalSignatures[K]>,
191
+ ): number;
192
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
193
+ /** @signal */
194
+ emit<K extends keyof TestMonitor.SignalSignatures>(
195
+ signal: K,
196
+ ...args: GObject.GjsParameters<TestMonitor.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
197
+ ): void;
198
+ emit(signal: string, ...args: any[]): void;
199
+
200
+ // Methods
201
+
202
+ destroy(): void;
203
+ }
204
+
205
+ /**
206
+ * @gir-type Alias
207
+ */
208
+ type ContextTestClass = typeof ContextTest;
209
+ /**
210
+ * @gir-type Alias
211
+ */
212
+ type TestMonitorClass = typeof TestMonitor;
213
+ /**
214
+ * Name of the imported GIR library
215
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
216
+ */
217
+ const __name__: string;
218
+ /**
219
+ * Version of the imported GIR library
220
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
221
+ */
222
+ const __version__: string;
223
+ }
224
+
225
+ export default MetaTest;
226
+
227
+ // END
package/metatest-18.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from 'gi://MetaTest?version=18';
4
+ export default MetaTest;
5
+
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@girs/metatest-18",
3
+ "version": "18.0.0-4.0.0-beta.41",
4
+ "description": "GJS TypeScript type definitions for MetaTest-18, generated from library version 18.0.0",
5
+ "type": "module",
6
+ "module": "metatest-18.js",
7
+ "main": "metatest-18.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./metatest-18-ambient.d.ts",
11
+ "import": "./metatest-18-ambient.js",
12
+ "default": "./metatest-18-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./metatest-18-import.d.ts",
16
+ "import": "./metatest-18-import.js",
17
+ "default": "./metatest-18-import.js"
18
+ },
19
+ "./metatest-18": {
20
+ "types": "./metatest-18.d.ts",
21
+ "import": "./metatest-18.js",
22
+ "default": "./metatest-18.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.41",
35
+ "@girs/xlib-2.0": "2.0.0-4.0.0-beta.41",
36
+ "@girs/xfixes-4.0": "4.0.0-4.0.0-beta.41",
37
+ "@girs/mtk-18": "18.0.0-4.0.0-beta.41",
38
+ "@girs/graphene-1.0": "1.0.0-4.0.0-beta.41",
39
+ "@girs/gobject-2.0": "2.88.0-4.0.0-beta.41",
40
+ "@girs/glib-2.0": "2.88.0-4.0.0-beta.41",
41
+ "@girs/meta-18": "18.0.0-4.0.0-beta.41",
42
+ "@girs/gio-2.0": "2.88.0-4.0.0-beta.41",
43
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.41",
44
+ "@girs/gdesktopenums-3.0": "3.0.0-4.0.0-beta.41",
45
+ "@girs/cogl-18": "18.0.0-4.0.0-beta.41",
46
+ "@girs/gl-1.0": "1.0.0-4.0.0-beta.41",
47
+ "@girs/clutter-18": "18.0.0-4.0.0-beta.41",
48
+ "@girs/pango-1.0": "1.57.0-4.0.0-beta.41",
49
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.41",
50
+ "@girs/harfbuzz-0.0": "12.3.2-4.0.0-beta.41",
51
+ "@girs/freetype2-2.0": "2.0.0-4.0.0-beta.41",
52
+ "@girs/atk-1.0": "2.60.0-4.0.0-beta.41" },
53
+ "devDependencies": {
54
+ "typescript": "*"
55
+ },
56
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "MetaTest-18"],
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-18#readme"
67
+ }
68
+
69
+
package/tsconfig.json ADDED
@@ -0,0 +1,84 @@
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
+ "paths": {
22
+ "@girs/xlib-2.0": [
23
+ "../xlib-2.0/index.d.ts"
24
+ ],
25
+ "@girs/xfixes-4.0": [
26
+ "../xfixes-4.0/index.d.ts"
27
+ ],
28
+ "@girs/mtk-18": [
29
+ "../mtk-18/index.d.ts"
30
+ ],
31
+ "@girs/graphene-1.0": [
32
+ "../graphene-1.0/index.d.ts"
33
+ ],
34
+ "@girs/gobject-2.0": [
35
+ "../gobject-2.0/index.d.ts"
36
+ ],
37
+ "@girs/glib-2.0": [
38
+ "../glib-2.0/index.d.ts"
39
+ ],
40
+ "@girs/meta-18": [
41
+ "../meta-18/index.d.ts"
42
+ ],
43
+ "@girs/gio-2.0": [
44
+ "../gio-2.0/index.d.ts"
45
+ ],
46
+ "@girs/gmodule-2.0": [
47
+ "../gmodule-2.0/index.d.ts"
48
+ ],
49
+ "@girs/gdesktopenums-3.0": [
50
+ "../gdesktopenums-3.0/index.d.ts"
51
+ ],
52
+ "@girs/cogl-18": [
53
+ "../cogl-18/index.d.ts"
54
+ ],
55
+ "@girs/gl-1.0": [
56
+ "../gl-1.0/index.d.ts"
57
+ ],
58
+ "@girs/clutter-18": [
59
+ "../clutter-18/index.d.ts"
60
+ ],
61
+ "@girs/pango-1.0": [
62
+ "../pango-1.0/index.d.ts"
63
+ ],
64
+ "@girs/cairo-1.0": [
65
+ "../cairo-1.0/index.d.ts"
66
+ ],
67
+ "@girs/harfbuzz-0.0": [
68
+ "../harfbuzz-0.0/index.d.ts"
69
+ ],
70
+ "@girs/freetype2-2.0": [
71
+ "../freetype2-2.0/index.d.ts"
72
+ ],
73
+ "@girs/atk-1.0": [
74
+ "../atk-1.0/index.d.ts"
75
+ ],
76
+ "@girs/gjs": [
77
+ "../gjs/index.d.ts"
78
+ ]
79
+ }
80
+ },
81
+ "include": ["./metatest-18.d.ts"]
82
+ }
83
+
84
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./metatest-18.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "MetaTest-18",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+