3.0.0 • Published 6 months ago

@gtile/gnome-shell v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

GNOME Shell TypeScript Type Definitions

GJS TypeScript type definitions for GNOME Shell Extensions.

The types are currently in a very experimental state and rely on your contributions. Therefore, this project can be seen as a basic structure for further development. The typescript types of the .gir files are generated with ts-for-gir, the rest is written by hand and contained in this repository.

Install

To use this type definitions, install them with NPM like this:

npm install @girs/gnome-shell

Usage

You can import this package into your project like this:

import GnomeShell from '@girs/gnome-shell';

If you prefer CommonJS, you can also use this:

const GnomeShell = require('@girs/gnome-shell');

GNOME Shell extensions currently do not yet support ESM imports and instead rely on the global imports variable from GJS. However, you can still use ESM syntax in TypeScript, but you need to ensure that your bundler translates these imports to CommonJS. We recommended to use esbuild, which we also use in our example.