GJS TypeScript type definitions for Clutter-6, generated from library version 6.0.0
npm install @girs/clutter-6
GJS TypeScript type definitions for Clutter-6, generated from library version 6.0.0 using ts-for-gir v4.0.0-beta.38.
To use this type definitions, install them with NPM:
``bash`
npm install @girs/clutter-6
You can import this package into your project like this:
`ts`
import Clutter from '@girs/clutter-6';
You can also use ambient modules to import this module like you would do this in JavaScript.
For this you need to include @girs/clutter-6 or @girs/clutter-6/ambient in your tsconfig or entry point Typescript file:
index.ts:`ts`
import '@girs/clutter-6'
tsconfig.json:`json`
{
"compilerOptions": {
...
},
"include": ["@girs/clutter-6"],
...
}
Now you can import the ambient module with TypeScript support:
`ts`
import Clutter from 'gi://Clutter?version=6';
You can also import the module with Typescript support using the global imports.gi object of GJS.@girs/clutter-6
For this you need to include or @girs/clutter-6/import in your tsconfig or entry point Typescript file:
index.ts:`ts`
import '@girs/clutter-6'
tsconfig.json:`json`
{
"compilerOptions": {
...
},
"include": ["@girs/clutter-6"],
...
}
Now you have also type support for this, too:
`ts``
const Clutter = imports.gi.Clutter;
Depending on your project configuration, it is recommended to use a bundler like esbuild. You can find examples using different bundlers here.
All existing pre-generated packages can be found on gjsify/types.