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