@girs/ministream-1 0.99.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
+ # Ministream-1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/ministream-1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/ministream-1)
6
+
7
+
8
+ GJS TypeScript type definitions for Ministream-1, generated from library version 0.99.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/ministream-1
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import Ministream from '@girs/ministream-1';
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/ministream-1` or `@girs/ministream-1/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/ministream-1'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/ministream-1"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import Ministream from 'gi://Ministream?version=1';
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/ministream-1` or `@girs/ministream-1/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/ministream-1'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/ministream-1"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const Ministream = imports.gi.Ministream;
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 './ministream-1-ambient.d.ts';
11
+
12
+ import './ministream-1-import.d.ts';
13
+
14
+ import Ministream from './ministream-1.js';
15
+ export default Ministream;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import Ministream from './ministream-1.js';
4
+ export default Ministream;
5
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://Ministream?version=1' {
2
+ import Ministream1 from '@girs/ministream-1';
3
+ export default Ministream1;
4
+ }
5
+
6
+ declare module 'gi://Ministream' {
7
+ import Ministream1 from 'gi://Ministream?version=1';
8
+ export default Ministream1;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type Ministream1 from '@girs/ministream-1';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ Ministream: typeof Ministream1;
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,166 @@
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 GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export namespace Ministream {
17
+ /**
18
+ * Ministream-1
19
+ */
20
+
21
+ /**
22
+ * @gir-type Struct
23
+ */
24
+ class Error extends GLib.Error {
25
+ static $gtype: GObject.GType<GLib.Error>;
26
+
27
+ // Static fields
28
+
29
+ static NO_COMPONENT: number;
30
+ static NO_IDENTIFIER: number;
31
+
32
+ // Constructors
33
+
34
+ constructor(options: { message: string; code: number });
35
+
36
+ // Static methods
37
+
38
+ static quark(): GLib.Quark;
39
+ }
40
+
41
+ /**
42
+ * Ministream major version component.
43
+ */
44
+ const MAJOR_VERSION: number;
45
+ /**
46
+ * Ministream minor version component.
47
+ */
48
+ const MINOR_VERSION: number;
49
+ function error_quark(): GLib.Quark;
50
+ /**
51
+ * @gir-type Struct
52
+ */
53
+ class Component {
54
+ static $gtype: GObject.GType<Component>;
55
+
56
+ // Constructors
57
+
58
+ constructor(data: Uint8Array | string);
59
+
60
+ static new_from_xml_data(data: Uint8Array | string): Component;
61
+
62
+ // Methods
63
+
64
+ /**
65
+ * Get the bugtracker URI of this component.
66
+ * @returns the bugtracker URI
67
+ */
68
+ get_bugtracker_uri(): string | null;
69
+ /**
70
+ * Gets the desktop launchables this component provides.
71
+ * @returns the desktop launchables
72
+ */
73
+ get_desktop_launchables(): string[] | null;
74
+ /**
75
+ * Gets the name of the developer that has written this component in the
76
+ * best locale available.
77
+ * @returns the localized developer name
78
+ */
79
+ get_developer_name(): string | null;
80
+ /**
81
+ * Get the help URI of this component.
82
+ * @returns the help URI
83
+ */
84
+ get_help_uri(): string | null;
85
+ /**
86
+ * Get the homepage URI of this component.
87
+ * @returns the hompage URI
88
+ */
89
+ get_homepage_uri(): string | null;
90
+ /**
91
+ * Get the application identifier of this component. This should be in
92
+ * the big-endian domain format.
93
+ * @returns the application identifier
94
+ */
95
+ get_id(): string;
96
+ /**
97
+ * Get the application name of this component in the best locale
98
+ * available.
99
+ * @returns the localized application name
100
+ */
101
+ get_name(): string | null;
102
+ /**
103
+ * Get the license of the project this component is part of. This should
104
+ * be an identifier part of the SPDX license list.
105
+ * @returns the project license identifier
106
+ */
107
+ get_project_license(): string | null;
108
+ /**
109
+ * Gets the releases information of this component.
110
+ * @returns the releases of this component
111
+ */
112
+ get_releases(): Release[] | null;
113
+ /**
114
+ * Increment the reference count of the component.
115
+ *
116
+ * This is an atomic operation and as such, threadsafe.
117
+ * @returns the new reference of `self`
118
+ */
119
+ ref(): Component;
120
+ /**
121
+ * Decrements the reference count of the component. Once the count
122
+ * reaches zero, `self` will be freed.
123
+ *
124
+ * As such, do not use `self` after calling this method.
125
+ */
126
+ unref(): void;
127
+ }
128
+
129
+ /**
130
+ * @gir-type Struct
131
+ */
132
+ abstract class Release {
133
+ static $gtype: GObject.GType<Release>;
134
+
135
+ // Methods
136
+
137
+ /**
138
+ * Gets the description attached to the releease, or `null` if not set.
139
+ *
140
+ * The description is encoded as markup, containg paragraphs, ordered
141
+ * and unordered lists, aswell as list items within them.
142
+ * @returns the description of the release
143
+ */
144
+ get_description(): string | null;
145
+ /**
146
+ * Gets the version attached to the release, or `null` if not set.
147
+ * @returns the version of the release
148
+ */
149
+ get_version(): string | null;
150
+ }
151
+
152
+ /**
153
+ * Name of the imported GIR library
154
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
155
+ */
156
+ const __name__: string;
157
+ /**
158
+ * Version of the imported GIR library
159
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
160
+ */
161
+ const __version__: string;
162
+ }
163
+
164
+ export default Ministream;
165
+
166
+ // END
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import Ministream from 'gi://Ministream?version=1';
4
+ export default Ministream;
5
+
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@girs/ministream-1",
3
+ "version": "0.99.0-4.0.0-beta.41",
4
+ "description": "GJS TypeScript type definitions for Ministream-1, generated from library version 0.99.0",
5
+ "type": "module",
6
+ "module": "ministream-1.js",
7
+ "main": "ministream-1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./ministream-1-ambient.d.ts",
11
+ "import": "./ministream-1-ambient.js",
12
+ "default": "./ministream-1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./ministream-1-import.d.ts",
16
+ "import": "./ministream-1-import.js",
17
+ "default": "./ministream-1-import.js"
18
+ },
19
+ "./ministream-1": {
20
+ "types": "./ministream-1.d.ts",
21
+ "import": "./ministream-1.js",
22
+ "default": "./ministream-1.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/gobject-2.0": "2.88.0-4.0.0-beta.41",
36
+ "@girs/glib-2.0": "2.88.0-4.0.0-beta.41" },
37
+ "devDependencies": {
38
+ "typescript": "*"
39
+ },
40
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "Ministream-1"],
41
+ "author": "ts-for-gir",
42
+ "license": "MIT",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/gjsify/types.git"
46
+ },
47
+ "bugs": {
48
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
49
+ },
50
+ "homepage": "https://github.com/gjsify/types/tree/main/ministream-1#readme"
51
+ }
52
+
53
+
package/tsconfig.json ADDED
@@ -0,0 +1,36 @@
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/gobject-2.0": [
23
+ "../gobject-2.0/index.d.ts"
24
+ ],
25
+ "@girs/glib-2.0": [
26
+ "../glib-2.0/index.d.ts"
27
+ ],
28
+ "@girs/gjs": [
29
+ "../gjs/index.d.ts"
30
+ ]
31
+ }
32
+ },
33
+ "include": ["./ministream-1.d.ts"]
34
+ }
35
+
36
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./ministream-1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Ministream-1",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+