@girs/papersdocument-4.0 4.2.0
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 +85 -0
- package/index.d.ts +16 -0
- package/index.js +5 -0
- package/package.json +72 -0
- package/papersdocument-4.0-ambient.d.ts +12 -0
- package/papersdocument-4.0-ambient.js +2 -0
- package/papersdocument-4.0-import.d.ts +12 -0
- package/papersdocument-4.0-import.js +3 -0
- package/papersdocument-4.0.d.ts +6128 -0
- package/papersdocument-4.0.js +5 -0
- package/tsconfig.json +71 -0
- package/typedoc.json +9 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
# PapersDocument-4.0
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
GJS TypeScript type definitions for PapersDocument-4.0, generated from library version 51.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Install the type definitions with npm:
|
|
13
|
+
```bash
|
|
14
|
+
npm install @girs/papersdocument-4.0
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Import it like any other module:
|
|
20
|
+
```ts
|
|
21
|
+
import PapersDocument from '@girs/papersdocument-4.0';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Ambient Modules
|
|
25
|
+
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
|
+
For this you need to include `@girs/papersdocument-4.0` or `@girs/papersdocument-4.0/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
|
+
|
|
29
|
+
`index.ts`:
|
|
30
|
+
```ts
|
|
31
|
+
import '@girs/papersdocument-4.0'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`tsconfig.json`:
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"compilerOptions": {
|
|
38
|
+
...
|
|
39
|
+
},
|
|
40
|
+
"include": ["@girs/papersdocument-4.0"],
|
|
41
|
+
...
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import PapersDocument from 'gi://PapersDocument?version=4.0';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Global import
|
|
52
|
+
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
|
+
For this you need to include `@girs/papersdocument-4.0` or `@girs/papersdocument-4.0/import` in your `tsconfig` or entry point Typescript file:
|
|
55
|
+
|
|
56
|
+
`index.ts`:
|
|
57
|
+
```ts
|
|
58
|
+
import '@girs/papersdocument-4.0'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`tsconfig.json`:
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"compilerOptions": {
|
|
65
|
+
...
|
|
66
|
+
},
|
|
67
|
+
"include": ["@girs/papersdocument-4.0"],
|
|
68
|
+
...
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
That form carries types as well:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
const PapersDocument = imports.gi.PapersDocument;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Bundle
|
|
79
|
+
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
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,16 @@
|
|
|
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 './papersdocument-4.0-ambient.d.ts';
|
|
11
|
+
|
|
12
|
+
import './papersdocument-4.0-import.d.ts';
|
|
13
|
+
|
|
14
|
+
import PapersDocument from './papersdocument-4.0.js';
|
|
15
|
+
export default PapersDocument;
|
|
16
|
+
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/papersdocument-4.0",
|
|
3
|
+
"version": "4.2.0",
|
|
4
|
+
"libraryVersion": "51.0.0",
|
|
5
|
+
"description": "GJS TypeScript type definitions for PapersDocument-4.0, generated from library version 51.0.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"module": "papersdocument-4.0.js",
|
|
8
|
+
"main": "papersdocument-4.0.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./ambient": {
|
|
11
|
+
"types": "./papersdocument-4.0-ambient.d.ts",
|
|
12
|
+
"import": "./papersdocument-4.0-ambient.js",
|
|
13
|
+
"default": "./papersdocument-4.0-ambient.js"
|
|
14
|
+
},
|
|
15
|
+
"./import": {
|
|
16
|
+
"types": "./papersdocument-4.0-import.d.ts",
|
|
17
|
+
"import": "./papersdocument-4.0-import.js",
|
|
18
|
+
"default": "./papersdocument-4.0-import.js"
|
|
19
|
+
},
|
|
20
|
+
"./papersdocument-4.0": {
|
|
21
|
+
"types": "./papersdocument-4.0.d.ts",
|
|
22
|
+
"import": "./papersdocument-4.0.js",
|
|
23
|
+
"default": "./papersdocument-4.0.js"
|
|
24
|
+
},
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"import": "./index.js",
|
|
28
|
+
"default": "./index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test": "tsc --project tsconfig.json"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@girs/gjs": "^4.2.0",
|
|
36
|
+
"@girs/pango-1.0": "^4.2.0",
|
|
37
|
+
"@girs/cairo-1.0": "^4.2.0",
|
|
38
|
+
"@girs/gobject-2.0": "^4.2.0",
|
|
39
|
+
"@girs/glib-2.0": "^4.2.0",
|
|
40
|
+
"@girs/harfbuzz-0.0": "^4.2.0",
|
|
41
|
+
"@girs/freetype2-2.0": "^4.2.0",
|
|
42
|
+
"@girs/gio-2.0": "^4.2.0",
|
|
43
|
+
"@girs/gmodule-2.0": "^4.2.0",
|
|
44
|
+
"@girs/gtk-4.0": "^4.2.0",
|
|
45
|
+
"@girs/gsk-4.0": "^4.2.0",
|
|
46
|
+
"@girs/graphene-1.0": "^4.2.0",
|
|
47
|
+
"@girs/gdk-4.0": "^4.2.0",
|
|
48
|
+
"@girs/pangocairo-1.0": "^4.2.0",
|
|
49
|
+
"@girs/gdkpixbuf-2.0": "^4.2.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"typescript": "*"
|
|
53
|
+
},
|
|
54
|
+
"keywords": [
|
|
55
|
+
"Gir",
|
|
56
|
+
"TypeScript",
|
|
57
|
+
"types",
|
|
58
|
+
"GObject-Introspection",
|
|
59
|
+
"GJS",
|
|
60
|
+
"PapersDocument-4.0"
|
|
61
|
+
],
|
|
62
|
+
"author": "ts-for-gir",
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/gjsify/types.git"
|
|
67
|
+
},
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
70
|
+
},
|
|
71
|
+
"homepage": "https://github.com/gjsify/types/tree/main/papersdocument-4.0#readme"
|
|
72
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
declare module 'gi://PapersDocument?version=4.0' {
|
|
3
|
+
import PapersDocument40 from '@girs/papersdocument-4.0';
|
|
4
|
+
export default PapersDocument40;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module 'gi://PapersDocument' {
|
|
8
|
+
import PapersDocument40 from 'gi://PapersDocument?version=4.0';
|
|
9
|
+
export default PapersDocument40;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|