@girs/gexiv2-0.16 0.16.0-4.0.0-beta.37

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
+ # GExiv2-0.16
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/gexiv2-0.16)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/gexiv2-0.16)
6
+
7
+
8
+ GJS TypeScript type definitions for GExiv2-0.16, generated from library version 0.16.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.37.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/gexiv2-0.16
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import GExiv2 from '@girs/gexiv2-0.16';
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/gexiv2-0.16` or `@girs/gexiv2-0.16/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/gexiv2-0.16'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/gexiv2-0.16"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import GExiv2 from 'gi://GExiv2?version=0.16';
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/gexiv2-0.16` or `@girs/gexiv2-0.16/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/gexiv2-0.16'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/gexiv2-0.16"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const GExiv2 = imports.gi.GExiv2;
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
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://GExiv2?version=0.16' {
2
+ import GExiv2016 from '@girs/gexiv2-0.16';
3
+ export default GExiv2016;
4
+ }
5
+
6
+ declare module 'gi://GExiv2' {
7
+ import GExiv2016 from 'gi://GExiv2?version=0.16';
8
+ export default GExiv2016;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type GExiv2016 from '@girs/gexiv2-0.16';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ GExiv2: typeof GExiv2016;
6
+ }
7
+ }
8
+
9
+ export default GjsGiImports;
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+