
This is the TypeScript API reference for GJS — the GNOME JavaScript runtime. Browse the modules below to find detailed type information for GLib, GTK, GStreamer, and many other GNOME libraries.
All type definitions are auto-generated from GObject Introspection data using ts-for-gir and can be installed as NPM packages for use in your projects. You can also use ts-for-gir to generate the type definitions and this documentation yourself for any GIR module available on your system.
Each documented module is available as a pre-generated NPM package under the @girs scope. For example, to develop a GTK 4 application with GJS:
npm install @girs/gjs @girs/gtk-4.0 --save
import '@girs/gjs'
import '@girs/gjs/dom'
import '@girs/gtk-4.0'
import Gtk from 'gi://Gtk?version=4.0';
const button = new Gtk.Button();
All pre-generated packages can be found on gjsify/types.
GNOME Applications
GNOME Shell Extensions
Looking for a starting point? These example projects demonstrate how to use the TypeScript definitions with various bundlers:
More examples with screenshots and descriptions can be found in the ts-for-gir examples directory.
The following modules are documented on this site, grouped by category. Click on any module to browse its classes, interfaces, enums, functions, and constants.
GJS is a JavaScript runtime for the GNOME ecosystem. This package provides core type definitions for GJS built-in modules.
GIO provides a modern and easy-to-use VFS API, including file system abstraction, networking, D-Bus support, and application infrastructure.
GLib provides the core application building blocks for libraries and applications written in C. It provides the core object system used in GNOME, the main loop implementation, and a large set of utility functions for strings and common data structures.
Portable method for dynamically loading plug-ins.
The base type system and object class library, providing signal/callback handling, properties, and reference counting.
Pango is a library for laying out and rendering text, with an emphasis on internationalization.
Cairo rendering support for Pango.
A 2D graphics library with support for multiple output devices.
Image loading library.
A thin layer of mathematical types for 3D libraries.
A freely available software library to render fonts.
A text shaping engine — converts Unicode text to glyph indices and positions.
Powerful framework for creating multimedia applications.
GStreamer app library.
GStreamer Audio Library.
GStreamer base plugin libraries.
General application and plugin utility library.
GStreamer tag support library.
Support library for video operations.
JavaScript engine used by WebKitGTK.
A full-featured port of the WebKit rendering engine for GTK.
Building blocks for modern adaptive GNOME applications.
A GNOME library that extends GtkTextView with syntax highlighting, undo/redo, search and replace, a completion system, and other source code editing features.
A library providing serialization and deserialization support for the JSON format.
Network management daemon and client library.
A library for sending desktop notifications.
Application-level toolkit for defining and handling authorization policies.
A library for accessing the Secret Service API of the freedesktop.org project.
A library providing a widget to display maps in applications.
HTTP client/server library for GNOME.
GJS TypeScript type definitions for AppStream-1.0, generated from library version 1.1.1
GJS TypeScript type definitions for Atk-1.0, generated from library version 2.58.3
GJS TypeScript type definitions for Atspi-2.0, generated from library version 2.0.0
GJS TypeScript type definitions for DBus-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for Dex-1, generated from library version 1.0.0
GJS TypeScript type definitions for Flatpak-1.0, generated from library version 1.16.1
GJS TypeScript type definitions for Gck-2, generated from library version 4.4.0
GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0
GJS TypeScript type definitions for GdkWayland-4.0, generated from library version 4.0.0
GJS TypeScript type definitions for GdkX11-4.0, generated from library version 4.0.0
GJS TypeScript type definitions for GES-1.0, generated from library version 1.24.7
GJS TypeScript type definitions for Goa-1.0, generated from library version 3.56.0
GJS TypeScript type definitions for Grl-0.3, generated from library version 0.3.0
GJS TypeScript type definitions for GrlNet-0.3, generated from library version 0.3.0
GJS TypeScript type definitions for GSSDP-1.6, generated from library version 1.6.0
GJS TypeScript type definitions for GstGL-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for GstPlayer-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for GstSdp-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for GstWebRTC-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for GUdev-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for GUPnP-1.6, generated from library version 1.6.0
GJS TypeScript type definitions for GWeather-4.0, generated from library version 4.0.0
GJS TypeScript type definitions for Jsonrpc-1.0, generated from library version 3.44.2
GJS TypeScript type definitions for Libosinfo-1.0, generated from library version 1.12.0
GJS TypeScript type definitions for libxml2-2.0, generated from library version 2.0.0
GJS TypeScript type definitions for Panel-1, generated from library version 1.10.2
GJS TypeScript type definitions for Peas-2, generated from library version 2.0.0
GJS TypeScript type definitions for PolkitAgent-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for Poppler-0.18, generated from library version 25.9.1
GJS TypeScript type definitions for Rest-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for Rsvg-2.0, generated from library version 2.61.3
GJS TypeScript type definitions for Spelling-1, generated from library version 1.0.0
GJS TypeScript type definitions for Template-1.0, generated from library version 3.38.0
GJS TypeScript type definitions for Tsparql-3.0, generated from library version 3.10.1
GJS TypeScript type definitions for Vte-3.91, generated from library version 0.82.1
GJS TypeScript type definitions for WebKitWebProcessExtension-6.0, generated from library version 6.0.0
GJS TypeScript type definitions for Wnck-3.0, generated from library version 43.0.0
GJS TypeScript type definitions for Xdp-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for XdpGtk4-1.0, generated from library version 1.0.0
GJS TypeScript type definitions for xlib-2.0, generated from library version 2.0.0