@girs/metatest-16 16.0.0-4.0.0-beta.21

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,86 @@
1
+
2
+ # MetaTest-16
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/metatest-16)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/metatest-16)
6
+
7
+
8
+ GJS TypeScript type definitions for MetaTest-16, generated from library version 16.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/metatest-16
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import MetaTest from '@girs/metatest-16';
23
+ ```
24
+
25
+ ### Ambient Modules
26
+
27
+ 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.
28
+ For this you need to include `@girs/metatest-16` or `@girs/metatest-16/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/metatest-16'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/metatest-16"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import MetaTest from 'gi://MetaTest?version=16';
50
+ ```
51
+
52
+ ### Global import
53
+
54
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
55
+ For this you need to include `@girs/metatest-16` or `@girs/metatest-16/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/metatest-16'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/metatest-16"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const MetaTest = imports.gi.MetaTest;
77
+ ```
78
+
79
+ ### Bundle
80
+
81
+ 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).
82
+
83
+ ## Other packages
84
+
85
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
86
+
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-16-ambient.d.ts';
11
+
12
+ import './metatest-16-import.d.ts';
13
+
14
+ import MetaTest from './metatest-16.js';
15
+ export default MetaTest;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from './metatest-16.js';
4
+ export default MetaTest;
5
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://MetaTest?version=16' {
2
+ import MetaTest16 from '@girs/metatest-16';
3
+ export default MetaTest16;
4
+ }
5
+
6
+ declare module 'gi://MetaTest' {
7
+ import MetaTest16 from 'gi://MetaTest?version=16';
8
+ export default MetaTest16;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import MetaTest16 from '@girs/metatest-16';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ MetaTest: typeof MetaTest16;
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,153 @@
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
+ // Module dependencies
11
+ import type xlib from '@girs/xlib-2.0';
12
+ import type xfixes from '@girs/xfixes-4.0';
13
+ import type Mtk from '@girs/mtk-16';
14
+ import type Graphene from '@girs/graphene-1.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+ import type Meta from '@girs/meta-16';
18
+ import type Gio from '@girs/gio-2.0';
19
+ import type GModule from '@girs/gmodule-2.0';
20
+ import type GDesktopEnums from '@girs/gdesktopenums-3.0';
21
+ import type Cogl from '@girs/cogl-16';
22
+ import type GL from '@girs/gl-1.0';
23
+ import type Clutter from '@girs/clutter-16';
24
+ import type Pango from '@girs/pango-1.0';
25
+ import type cairo from '@girs/cairo-1.0';
26
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
27
+ import type freetype2 from '@girs/freetype2-2.0';
28
+ import type Atk from '@girs/atk-1.0';
29
+
30
+ export namespace MetaTest {
31
+ /**
32
+ * MetaTest-16
33
+ */
34
+
35
+ export namespace ContextTestType {
36
+ export const $gtype: GObject.GType<ContextTestType>;
37
+ }
38
+
39
+ enum ContextTestType {
40
+ HEADLESS,
41
+ VKMS,
42
+ TEST,
43
+ }
44
+
45
+ export namespace ContextTestFlag {
46
+ export const $gtype: GObject.GType<ContextTestFlag>;
47
+ }
48
+
49
+ enum ContextTestFlag {
50
+ NONE,
51
+ TEST_CLIENT,
52
+ NO_X11,
53
+ NO_ANIMATIONS,
54
+ }
55
+
56
+ export namespace TestRunFlags {
57
+ export const $gtype: GObject.GType<TestRunFlags>;
58
+ }
59
+
60
+ enum TestRunFlags {
61
+ NONE,
62
+ CAN_SKIP,
63
+ }
64
+ namespace ContextTest {
65
+ // Signal callback interfaces
66
+
67
+ interface AfterTests {
68
+ (): void;
69
+ }
70
+
71
+ interface BeforeTests {
72
+ (): void;
73
+ }
74
+
75
+ interface RunTests {
76
+ (): number;
77
+ }
78
+
79
+ // Constructor properties interface
80
+
81
+ interface ConstructorProps extends Meta.Context.ConstructorProps {}
82
+ }
83
+
84
+ class ContextTest extends Meta.Context {
85
+ static $gtype: GObject.GType<ContextTest>;
86
+
87
+ // Constructors
88
+
89
+ constructor(properties?: Partial<ContextTest.ConstructorProps>, ...args: any[]);
90
+
91
+ _init(...args: any[]): void;
92
+
93
+ // Signals
94
+
95
+ connect(id: string, callback: (...args: any[]) => any): number;
96
+ connect_after(id: string, callback: (...args: any[]) => any): number;
97
+ emit(id: string, ...args: any[]): void;
98
+ connect(signal: 'after-tests', callback: (_source: this) => void): number;
99
+ connect_after(signal: 'after-tests', callback: (_source: this) => void): number;
100
+ emit(signal: 'after-tests'): void;
101
+ connect(signal: 'before-tests', callback: (_source: this) => void): number;
102
+ connect_after(signal: 'before-tests', callback: (_source: this) => void): number;
103
+ emit(signal: 'before-tests'): void;
104
+ connect(signal: 'run-tests', callback: (_source: this) => number): number;
105
+ connect_after(signal: 'run-tests', callback: (_source: this) => number): number;
106
+ emit(signal: 'run-tests'): void;
107
+
108
+ // Methods
109
+
110
+ run_tests(flags: TestRunFlags | null): number;
111
+ set_background_color(color: Cogl.Color): void;
112
+ wait_for_x11_display(): void;
113
+ }
114
+
115
+ namespace TestMonitor {
116
+ // Constructor properties interface
117
+
118
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
119
+ }
120
+
121
+ class TestMonitor extends GObject.Object {
122
+ static $gtype: GObject.GType<TestMonitor>;
123
+
124
+ // Constructors
125
+
126
+ constructor(properties?: Partial<TestMonitor.ConstructorProps>, ...args: any[]);
127
+
128
+ _init(...args: any[]): void;
129
+
130
+ static ['new'](context: Meta.Context, width: number, height: number, refresh_rate: number): TestMonitor;
131
+
132
+ // Methods
133
+
134
+ destroy(): void;
135
+ }
136
+
137
+ type ContextTestClass = typeof ContextTest;
138
+ type TestMonitorClass = typeof TestMonitor;
139
+ /**
140
+ * Name of the imported GIR library
141
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
142
+ */
143
+ const __name__: string;
144
+ /**
145
+ * Version of the imported GIR library
146
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
147
+ */
148
+ const __version__: string;
149
+ }
150
+
151
+ export default MetaTest;
152
+
153
+ // END
package/metatest-16.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import MetaTest from 'gi://MetaTest?version=16';
4
+ export default MetaTest;
5
+
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@girs/metatest-16",
3
+ "version": "16.0.0-4.0.0-beta.21",
4
+ "description": "GJS TypeScript type definitions for MetaTest-16, generated from library version 16.0.0",
5
+ "type": "module",
6
+ "module": "metatest-16.js",
7
+ "main": "metatest-16.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./metatest-16-ambient.d.ts",
11
+ "import": "./metatest-16-ambient.js",
12
+ "default": "./metatest-16-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./metatest-16-import.d.ts",
16
+ "import": "./metatest-16-import.js",
17
+ "default": "./metatest-16-import.js"
18
+ },
19
+ "./metatest-16": {
20
+ "types": "./metatest-16.d.ts",
21
+ "import": "./metatest-16.js",
22
+ "default": "./metatest-16.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/atk-1.0": "^2.55.2-4.0.0-beta.21",
35
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.21",
36
+ "@girs/clutter-16": "^16.0.0-4.0.0-beta.21",
37
+ "@girs/cogl-16": "^16.0.0-4.0.0-beta.21",
38
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.21",
39
+ "@girs/gdesktopenums-3.0": "^3.0.0-4.0.0-beta.21",
40
+ "@girs/gio-2.0": "^2.83.3-4.0.0-beta.21",
41
+ "@girs/gjs": "^4.0.0-beta.21",
42
+ "@girs/gl-1.0": "^1.0.0-4.0.0-beta.21",
43
+ "@girs/glib-2.0": "^2.83.3-4.0.0-beta.21",
44
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.21",
45
+ "@girs/gobject-2.0": "^2.83.3-4.0.0-beta.21",
46
+ "@girs/graphene-1.0": "^1.0.0-4.0.0-beta.21",
47
+ "@girs/harfbuzz-0.0": "^9.0.0-4.0.0-beta.21",
48
+ "@girs/meta-16": "^16.0.0-4.0.0-beta.21",
49
+ "@girs/mtk-16": "^16.0.0-4.0.0-beta.21",
50
+ "@girs/pango-1.0": "^1.56.0-4.0.0-beta.21",
51
+ "@girs/xfixes-4.0": "^4.0.0-4.0.0-beta.21",
52
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.21"
53
+ },
54
+ "devDependencies": {
55
+ "typescript": "*"
56
+ },
57
+ "keywords": [
58
+ "Gir",
59
+ "TypeScript",
60
+ "types",
61
+ "GObject-Introspection",
62
+ "GJS",
63
+ "MetaTest-16"
64
+ ],
65
+ "author": "ts-for-gir",
66
+ "license": "MIT",
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
70
+ },
71
+ "bugs": {
72
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
73
+ },
74
+ "homepage": "https://github.com/gjsify/types/tree/main/metatest-16#readme"
75
+ }
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-16.d.ts"]
23
+ }
24
+
25
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./metatest-16.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "MetaTest-16",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+