@girs/gio-2.0
Advanced tools
Comparing version 2.75.1-3.0.0-beta.12 to 2.76.1-3.0.0
@@ -9,1 +9,3 @@ | ||
{ | ||
"name": "@girs/gio-2.0", | ||
"version": "2.75.1-3.0.0-beta.12", | ||
"description": "GJS TypeScript type definitions for Gio-2.0, generated from library version 2.75.1", | ||
"version": "2.76.1-3.0.0", | ||
"description": "GJS TypeScript type definitions for Gio-2.0, generated from library version 2.76.1", | ||
"type": "module", | ||
@@ -15,2 +15,4 @@ "module": "gio-2.0.js", | ||
"exports": { | ||
"./ambient": "./gio-2.0-ambient.d.ts", | ||
"./import": "./gio-2.0-import.d.ts", | ||
".": { | ||
@@ -33,7 +35,8 @@ "import": { | ||
"dependencies": { | ||
"@girs/glib-2.0": "^2.75.1-3.0.0-beta.12", | ||
"@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12" | ||
"@girs/gjs": "^3.0.0", | ||
"@girs/gobject-2.0": "^2.76.1-3.0.0", | ||
"@girs/glib-2.0": "^2.76.1-3.0.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^*" | ||
"typescript": "^5.0.4" | ||
}, | ||
@@ -43,9 +46,12 @@ "keywords": [ | ||
"TypeScript", | ||
"types", | ||
"GObject-Introspection", | ||
"GJS", | ||
"Gio-2.0" | ||
], | ||
"author": "ts-for-gir", | ||
"license": "Apache-2.0", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/gjsify/ts-for-gir.git" | ||
"url": "git+https://github.com/gjsify/types.git" | ||
}, | ||
@@ -55,3 +61,3 @@ "bugs": { | ||
}, | ||
"homepage": "https://github.com/gjsify/ts-for-gir#readme" | ||
"homepage": "https://github.com/gjsify/types/tree/main/gio-2.0#readme" | ||
} |
# Gio-2.0 | ||
GJS TypeScript type definitions for Gio-2.0, generated from library version 2.75.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12. | ||
GJS TypeScript type definitions for Gio-2.0, generated from library version 2.76.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.0. | ||
@@ -10,3 +10,3 @@ GIO provides a modern and easy-to-use VFS API. It provides a file system abstraction which allows applications to access local and remote files with a single consistent API. | ||
To use this type definitions, install them with NPM like this: | ||
To use this type definitions, install them with NPM: | ||
```bash | ||
@@ -28,8 +28,63 @@ npm install @girs/gio-2.0 | ||
If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript: | ||
### Ambient Modules | ||
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. | ||
For this you need to include `@girs/gio-2.0` or `@girs/gio-2.0/ambient` in your `tsconfig` or entry point Typescript file: | ||
`index.ts`: | ||
```ts | ||
import '@girs/gio-2.0' | ||
``` | ||
`tsconfig.json`: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
... | ||
}, | ||
"include": ["@girs/gio-2.0"], | ||
... | ||
} | ||
``` | ||
Now you can import the ambient module with TypeScript support: | ||
```ts | ||
import Gio from 'gi://Gio?version=2.0'; | ||
``` | ||
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). | ||
### Global import | ||
You can also import the module with Typescript support using the global `imports.gi` object of GJS. | ||
For this you need to include `@girs/gio-2.0` or `@girs/gio-2.0/import` in your `tsconfig` or entry point Typescript file: | ||
`index.ts`: | ||
```ts | ||
import '@girs/gio-2.0' | ||
``` | ||
`tsconfig.json`: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
... | ||
}, | ||
"include": ["@girs/gio-2.0"], | ||
... | ||
} | ||
``` | ||
Now you have also type support for this, too: | ||
```ts | ||
const Gio = imports.gi.Gio; | ||
``` | ||
### Bundle | ||
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). | ||
## Other packages | ||
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types). | ||
@@ -20,1 +20,3 @@ { | ||
} | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4566390
9
48855
89
3
+ Added@girs/gjs@^3.0.0
+ Added@girs/gjs@3.3.0(transitive)
+ Added@girs/glib-2.0@2.76.1-3.2.32.78.0-3.3.0(transitive)
+ Added@girs/gobject-2.0@2.76.1-3.2.32.78.0-3.3.0(transitive)
- Removed@girs/glib-2.0@2.75.1-3.0.0-beta.12(transitive)
- Removed@girs/gobject-2.0@2.75.1-3.0.0-beta.12(transitive)
Updated@girs/glib-2.0@^2.76.1-3.0.0