@girs/gamerzilla-0.1 0.1.0-4.0.0-beta.3

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
+ # Gamerzilla-0.1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/gamerzilla-0.1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/gamerzilla-0.1)
6
+
7
+
8
+ GJS TypeScript type definitions for Gamerzilla-0.1, generated from library version 0.1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/gamerzilla-0.1
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import Gamerzilla from '@girs/gamerzilla-0.1';
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/gamerzilla-0.1` or `@girs/gamerzilla-0.1/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/gamerzilla-0.1'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/gamerzilla-0.1"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import Gamerzilla from 'gi://Gamerzilla?version=0.1';
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/gamerzilla-0.1` or `@girs/gamerzilla-0.1/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/gamerzilla-0.1'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/gamerzilla-0.1"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const Gamerzilla = imports.gi.Gamerzilla;
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
+
@@ -0,0 +1,12 @@
1
+
2
+ declare module 'gi://Gamerzilla?version=0.1' {
3
+ import Gamerzilla from '@girs/gamerzilla-0.1';
4
+ export default Gamerzilla;
5
+ }
6
+
7
+ declare module 'gi://Gamerzilla' {
8
+ import Gamerzilla01 from 'gi://Gamerzilla?version=0.1';
9
+ export default Gamerzilla01;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,12 @@
1
+
2
+ import Gamerzilla01 from '@girs/gamerzilla-0.1';
3
+
4
+ declare global {
5
+ export interface GjsGiImports {
6
+ Gamerzilla: typeof Gamerzilla01;
7
+ }
8
+ }
9
+
10
+ export default GjsGiImports;
11
+
12
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -0,0 +1,84 @@
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
+
8
+ import './gamerzilla-0.1-ambient.d.ts';
9
+
10
+ /**
11
+ * Gamerzilla-0.1
12
+ */
13
+
14
+ import type GObject from '@girs/gobject-2.0';
15
+ import type GLib from '@girs/glib-2.0';
16
+
17
+ export namespace Gamerzilla {
18
+ module GamerzillaGobj {
19
+ // Constructor properties interface
20
+
21
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
22
+ password: string;
23
+ url: string;
24
+ username: string;
25
+ }
26
+ }
27
+
28
+ class GamerzillaGobj extends GObject.Object {
29
+ static $gtype: GObject.GType<GamerzillaGobj>;
30
+
31
+ // Own properties of Gamerzilla.GamerzillaGobj
32
+
33
+ get password(): string;
34
+ set password(val: string);
35
+ get url(): string;
36
+ set url(val: string);
37
+ get username(): string;
38
+ set username(val: string);
39
+
40
+ // Constructors of Gamerzilla.GamerzillaGobj
41
+
42
+ constructor(properties?: Partial<GamerzillaGobj.ConstructorProps>, ...args: any[]);
43
+
44
+ _init(...args: any[]): void;
45
+
46
+ static ['new'](): GamerzillaGobj;
47
+
48
+ // Own methods of Gamerzilla.GamerzillaGobj
49
+
50
+ connect(): void;
51
+ connect(...args: never[]): any;
52
+ /**
53
+ * Runs the server.
54
+ */
55
+ serverstart(): void;
56
+ /**
57
+ * Stops the server.
58
+ */
59
+ serverstop(): void;
60
+ }
61
+
62
+ type GamerzillaGobjClass = typeof GamerzillaGobj;
63
+ abstract class GamerzillaGobjPrivate {
64
+ static $gtype: GObject.GType<GamerzillaGobjPrivate>;
65
+
66
+ // Constructors of Gamerzilla.GamerzillaGobjPrivate
67
+
68
+ _init(...args: any[]): void;
69
+ }
70
+
71
+ /**
72
+ * Name of the imported GIR library
73
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
74
+ */
75
+ const __name__: string;
76
+ /**
77
+ * Version of the imported GIR library
78
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
79
+ */
80
+ const __version__: string;
81
+ }
82
+
83
+ export default Gamerzilla;
84
+ // END
@@ -0,0 +1,6 @@
1
+
2
+ // @ts-expect-error
3
+ import Gamerzilla from 'gi://Gamerzilla?version=0.1';
4
+ export { Gamerzilla };
5
+ export default Gamerzilla;
6
+
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@girs/gamerzilla-0.1",
3
+ "version": "0.1.0-4.0.0-beta.3",
4
+ "description": "GJS TypeScript type definitions for Gamerzilla-0.1, generated from library version 0.1.0",
5
+ "type": "module",
6
+ "module": "gamerzilla-0.1.js",
7
+ "main": "gamerzilla-0.1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./gamerzilla-0.1-ambient.d.ts",
11
+ "import": "./gamerzilla-0.1-ambient.js",
12
+ "default": "./gamerzilla-0.1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./gamerzilla-0.1-import.d.ts",
16
+ "import": "./gamerzilla-0.1-import.js",
17
+ "default": "./gamerzilla-0.1-import.js"
18
+ },
19
+ ".": {
20
+ "types": "./gamerzilla-0.1.d.ts",
21
+ "import": "./gamerzilla-0.1.js",
22
+ "default": "./gamerzilla-0.1.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gamerzilla-0.1.d.ts"
27
+ },
28
+ "dependencies": {
29
+ "@girs/gjs": "^4.0.0-beta.3",
30
+ "@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
31
+ "@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3"
32
+ },
33
+ "devDependencies": {
34
+ "typescript": "*"
35
+ },
36
+ "keywords": [
37
+ "Gir",
38
+ "TypeScript",
39
+ "types",
40
+ "GObject-Introspection",
41
+ "GJS",
42
+ "Gamerzilla-0.1"
43
+ ],
44
+ "author": "ts-for-gir",
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
52
+ },
53
+ "homepage": "https://github.com/gjsify/types/tree/main/gamerzilla-0.1#readme"
54
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "node",
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
+ },
20
+ "include": ["./gamerzilla-0.1.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./gamerzilla-0.1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Gamerzilla-0.1",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+