@ci-types/gjs

Typescript definitions for GJS - Gnome JavaScript

Usage no npm install needed!

<script type="module">
  import ciTypesGjs from 'https://cdn.skypack.dev/@ci-types/gjs';
</script>

README

types-gjs

Typescript definitions for GJS - Gnome JavaScript

Generated with GitHub - Gr3q/GIR2TS: TypeScript declaration generator for GObject Introspection. and manually cleaned up.

Usage

This only works on a system where Gnome or some GTK based DM is installed.

Intended to be used with code running off of Gnome JS engine.

It can be included in the project by creatding a declaration file, for example gjs.d.ts:

import "@ci-types/gjs";

In the tsconfig.json file the option exactOptionalPropertyTypes should be set to true as for the construction of a GObject all properties are optional but are not allowed to be undefined.