@girs/deviced-1.0 3.27.4-4.0.0-beta.21
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 +86 -0
- package/deviced-1.0-ambient.d.ts +9 -0
- package/deviced-1.0-ambient.js +2 -0
- package/deviced-1.0-import.d.ts +9 -0
- package/deviced-1.0-import.js +3 -0
- package/deviced-1.0.d.ts +1603 -0
- package/deviced-1.0.js +5 -0
- package/index.d.ts +15 -0
- package/index.js +5 -0
- package/package.json +61 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
# Deviced-1.0
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

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