@girs/meta-10 10.0.0-3.0.1

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,87 @@
1
+
2
+ # Meta-10
3
+
4
+ GJS TypeScript type definitions for Meta-10, generated from library version 10.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.1.
5
+
6
+
7
+ ## Install
8
+
9
+ To use this type definitions, install them with NPM:
10
+ ```bash
11
+ npm install @girs/meta-10
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You can import this package into your project like this:
17
+ ```ts
18
+ import Meta from '@girs/meta-10';
19
+ ```
20
+
21
+ Or if you prefer CommonJS, you can also use this:
22
+ ```ts
23
+ const Meta = require('@girs/meta-10');
24
+ ```
25
+
26
+ ### Ambient Modules
27
+
28
+ 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.
29
+ For this you need to include `@girs/meta-10` or `@girs/meta-10/ambient` in your `tsconfig` or entry point Typescript file:
30
+
31
+ `index.ts`:
32
+ ```ts
33
+ import '@girs/meta-10'
34
+ ```
35
+
36
+ `tsconfig.json`:
37
+ ```json
38
+ {
39
+ "compilerOptions": {
40
+ ...
41
+ },
42
+ "include": ["@girs/meta-10"],
43
+ ...
44
+ }
45
+ ```
46
+
47
+ Now you can import the ambient module with TypeScript support:
48
+
49
+ ```ts
50
+ import Meta from 'gi://Meta?version=10';
51
+ ```
52
+
53
+ ### Global import
54
+
55
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
56
+ For this you need to include `@girs/meta-10` or `@girs/meta-10/import` in your `tsconfig` or entry point Typescript file:
57
+
58
+ `index.ts`:
59
+ ```ts
60
+ import '@girs/meta-10'
61
+ ```
62
+
63
+ `tsconfig.json`:
64
+ ```json
65
+ {
66
+ "compilerOptions": {
67
+ ...
68
+ },
69
+ "include": ["@girs/meta-10"],
70
+ ...
71
+ }
72
+ ```
73
+
74
+ Now you have also type support for this, too:
75
+
76
+ ```ts
77
+ const Meta = imports.gi.Meta;
78
+ ```
79
+
80
+ ### Bundle
81
+
82
+ 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).
83
+
84
+ ## Other packages
85
+
86
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
87
+
@@ -0,0 +1,9 @@
1
+
2
+
3
+ declare module 'gi://Meta?version=10' {
4
+ import Meta10 from '@girs/meta-10';
5
+ export default Meta10;
6
+ }
7
+
8
+
9
+
@@ -0,0 +1,13 @@
1
+
2
+
3
+ import Meta10 from '@girs/meta-10';
4
+
5
+ declare global {
6
+ export interface GjsGiImports {
7
+ Meta: typeof Meta10;
8
+ }
9
+ }
10
+
11
+ export default GjsGiImports;
12
+
13
+
package/meta-10.cjs ADDED
@@ -0,0 +1,11 @@
1
+
2
+
3
+ imports.gi.versions.Meta = '10'
4
+ const Meta = imports.gi.Meta;
5
+
6
+ module.exports = Meta;
7
+
8
+
9
+
10
+
11
+