@girs/govf-0.1 0.1.0-4.0.0-beta.6

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
+ # Govf-0.1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/govf-0.1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/govf-0.1)
6
+
7
+
8
+ GJS TypeScript type definitions for Govf-0.1, generated from library version 0.1.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.6.
9
+
10
+
11
+ ## Install
12
+
13
+ To use this type definitions, install them with NPM:
14
+ ```bash
15
+ npm install @girs/govf-0.1
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ You can import this package into your project like this:
21
+ ```ts
22
+ import Govf from '@girs/govf-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/govf-0.1` or `@girs/govf-0.1/ambient` in your `tsconfig` or entry point Typescript file:
29
+
30
+ `index.ts`:
31
+ ```ts
32
+ import '@girs/govf-0.1'
33
+ ```
34
+
35
+ `tsconfig.json`:
36
+ ```json
37
+ {
38
+ "compilerOptions": {
39
+ ...
40
+ },
41
+ "include": ["@girs/govf-0.1"],
42
+ ...
43
+ }
44
+ ```
45
+
46
+ Now you can import the ambient module with TypeScript support:
47
+
48
+ ```ts
49
+ import Govf from 'gi://Govf?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/govf-0.1` or `@girs/govf-0.1/import` in your `tsconfig` or entry point Typescript file:
56
+
57
+ `index.ts`:
58
+ ```ts
59
+ import '@girs/govf-0.1'
60
+ ```
61
+
62
+ `tsconfig.json`:
63
+ ```json
64
+ {
65
+ "compilerOptions": {
66
+ ...
67
+ },
68
+ "include": ["@girs/govf-0.1"],
69
+ ...
70
+ }
71
+ ```
72
+
73
+ Now you have also type support for this, too:
74
+
75
+ ```ts
76
+ const Govf = imports.gi.Govf;
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://Govf?version=0.1' {
3
+ import Govf from '@girs/govf-0.1';
4
+ export default Govf;
5
+ }
6
+
7
+ declare module 'gi://Govf' {
8
+ import Govf01 from 'gi://Govf?version=0.1';
9
+ export default Govf01;
10
+ }
11
+
12
+
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,12 @@
1
+
2
+ import Govf01 from '@girs/govf-0.1';
3
+
4
+ declare global {
5
+ export interface GjsGiImports {
6
+ Govf: typeof Govf01;
7
+ }
8
+ }
9
+
10
+ export default GjsGiImports;
11
+
12
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/govf-0.1.d.ts ADDED
@@ -0,0 +1,180 @@
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 './govf-0.1-ambient.d.ts';
9
+
10
+ /**
11
+ * Govf-0.1
12
+ */
13
+
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+ import type GModule from '@girs/gmodule-2.0';
18
+
19
+ export namespace Govf {
20
+ enum PackageError {
21
+ FAILED,
22
+ NOT_FOUND,
23
+ XML,
24
+ LAST,
25
+ }
26
+ module Disk {
27
+ // Constructor properties interface
28
+
29
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
30
+ }
31
+
32
+ class Disk extends GObject.Object {
33
+ static $gtype: GObject.GType<Disk>;
34
+
35
+ // Constructors of Govf.Disk
36
+
37
+ constructor(properties?: Partial<Disk.ConstructorProps>, ...args: any[]);
38
+
39
+ _init(...args: any[]): void;
40
+
41
+ static ['new'](): Disk;
42
+
43
+ // Own methods of Govf.Disk
44
+
45
+ /**
46
+ * Returns the disk's capacity.
47
+ * @returns the capacity
48
+ */
49
+ get_capacity(): string;
50
+ /**
51
+ * Returns the disk id.
52
+ * @returns the disk id
53
+ */
54
+ get_disk_id(): string;
55
+ /**
56
+ * Returns the disk's file reference.
57
+ * @returns the file ref
58
+ */
59
+ get_file_ref(): string;
60
+ /**
61
+ * Returns the disk's format.
62
+ * @returns the format
63
+ */
64
+ get_format(): string;
65
+ /**
66
+ * Sets a new capacity for the disk.
67
+ * @param capacity capacity for the disk
68
+ */
69
+ set_capacity(capacity: string): void;
70
+ /**
71
+ * Sets a new disk id for the disk.
72
+ * @param disk_id disk id for the disk
73
+ */
74
+ set_disk_id(disk_id: string): void;
75
+ /**
76
+ * Sets a new file reference for the disk.
77
+ * @param file_ref file ref for the disk
78
+ */
79
+ set_file_ref(file_ref: string): void;
80
+ /**
81
+ * Sets a new format for the disk.
82
+ * @param format format for the disk
83
+ */
84
+ set_format(format: string): void;
85
+ }
86
+
87
+ module Package {
88
+ // Constructor properties interface
89
+
90
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
91
+ }
92
+
93
+ class Package extends GObject.Object {
94
+ static $gtype: GObject.GType<Package>;
95
+
96
+ // Constructors of Govf.Package
97
+
98
+ constructor(properties?: Partial<Package.ConstructorProps>, ...args: any[]);
99
+
100
+ _init(...args: any[]): void;
101
+
102
+ static ['new'](): Package;
103
+
104
+ // Own static methods of Govf.Package
105
+
106
+ static error_quark(): GLib.Quark;
107
+
108
+ // Own methods of Govf.Package
109
+
110
+ /**
111
+ * Extracts a disk...
112
+ * @param disk a #GovfDisk
113
+ * @param save_path a file path
114
+ * @param cancellable a #GCancellable or %NULL
115
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
116
+ */
117
+ extract_disk(
118
+ disk: Disk,
119
+ save_path: string,
120
+ cancellable?: Gio.Cancellable | null,
121
+ callback?: Gio.AsyncReadyCallback<this> | null,
122
+ ): void;
123
+ extract_disk_finish(result: Gio.AsyncResult): boolean;
124
+ /**
125
+ * Returns an array with all the disks associated with the OVF package.
126
+ * @returns an array
127
+ */
128
+ get_disks(): Disk[];
129
+ /**
130
+ * Loads an OVF package from a memory buffer that holds an .ovf file.
131
+ * @param data OVF data
132
+ * @param length size of the OVF data
133
+ * @returns %TRUE if the operation succeeded
134
+ */
135
+ load_from_data(data: string, length: number): boolean;
136
+ /**
137
+ * Loads an OVF package from an uncompressed .ovf file.
138
+ * @param filename an .ovf file name
139
+ * @returns %TRUE if the operation succeeded
140
+ */
141
+ load_from_file(filename: string): boolean;
142
+ /**
143
+ * Loads an OVF package from a compressed .ova file.
144
+ *
145
+ * `callback` should call govf_package_load_from_ova_file_finish()
146
+ * to get the result of this asynchronous operation.
147
+ * @param filename an .ova file name
148
+ * @param cancellable a #GCancellable or %NULL
149
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
150
+ */
151
+ load_from_ova_file(
152
+ filename: string,
153
+ cancellable?: Gio.Cancellable | null,
154
+ callback?: Gio.AsyncReadyCallback<this> | null,
155
+ ): void;
156
+ load_from_ova_file_finish(result: Gio.AsyncResult): boolean;
157
+ /**
158
+ * Saves the OVF package to an uncompressed .ovf file.
159
+ * @param filename an .ovf file name
160
+ * @returns %TRUE if the operation succeeded
161
+ */
162
+ save_file(filename: string): boolean;
163
+ }
164
+
165
+ type DiskClass = typeof Disk;
166
+ type PackageClass = typeof Package;
167
+ /**
168
+ * Name of the imported GIR library
169
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
170
+ */
171
+ const __name__: string;
172
+ /**
173
+ * Version of the imported GIR library
174
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
175
+ */
176
+ const __version__: string;
177
+ }
178
+
179
+ export default Govf;
180
+ // END
package/govf-0.1.js ADDED
@@ -0,0 +1,6 @@
1
+
2
+ // @ts-expect-error
3
+ import Govf from 'gi://Govf?version=0.1';
4
+ export { Govf };
5
+ export default Govf;
6
+
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@girs/govf-0.1",
3
+ "version": "0.1.0-4.0.0-beta.6",
4
+ "description": "GJS TypeScript type definitions for Govf-0.1, generated from library version 0.1.0",
5
+ "type": "module",
6
+ "module": "govf-0.1.js",
7
+ "main": "govf-0.1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./govf-0.1-ambient.d.ts",
11
+ "import": "./govf-0.1-ambient.js",
12
+ "default": "./govf-0.1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./govf-0.1-import.d.ts",
16
+ "import": "./govf-0.1-import.js",
17
+ "default": "./govf-0.1-import.js"
18
+ },
19
+ ".": {
20
+ "types": "./govf-0.1.d.ts",
21
+ "import": "./govf-0.1.js",
22
+ "default": "./govf-0.1.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "test": "tsc --project tsconfig.json"
27
+ },
28
+ "dependencies": {
29
+ "@girs/gio-2.0": "^2.80.3-4.0.0-beta.6",
30
+ "@girs/gjs": "^4.0.0-beta.6",
31
+ "@girs/glib-2.0": "^2.80.3-4.0.0-beta.6",
32
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.6",
33
+ "@girs/gobject-2.0": "^2.80.3-4.0.0-beta.6"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "*"
37
+ },
38
+ "keywords": [
39
+ "Gir",
40
+ "TypeScript",
41
+ "types",
42
+ "GObject-Introspection",
43
+ "GJS",
44
+ "Govf-0.1"
45
+ ],
46
+ "author": "ts-for-gir",
47
+ "license": "MIT",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
54
+ },
55
+ "homepage": "https://github.com/gjsify/types/tree/main/govf-0.1#readme"
56
+ }
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": ["./govf-0.1.d.ts"]
21
+ }
22
+
23
+
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./govf-0.1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Govf-0.1",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+