TypeScript API Documentation for GJS

TS for GIR

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

Gjs

GJS is a JavaScript runtime for the GNOME ecosystem. This package provides core type definitions for GJS built-in modules.

Gwebgl-0.1

WebGL bindings for GJS.

GLib

DBus-1.0

D-Bus inter-process communication type definitions.

Gio-2.0

GIO provides a modern and easy-to-use VFS API, including file system abstraction, networking, D-Bus support, and application infrastructure.

GioUnix-2.0

Unix-specific GIO interfaces and utilities.

GioWin32-2.0

Windows-specific GIO interfaces and utilities.

GLib-2.0

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.

GLibUnix-2.0

Unix-specific GLib API extensions.

GLibWin32-2.0

Windows-specific GLib API extensions.

GModule-2.0

Portable method for dynamically loading plug-ins.

GObject-2.0

The base type system and object class library, providing signal/callback handling, properties, and reference counting.

win32-1.0

Windows API type aliases for GObject Introspection.

GTK 4

Gdk-4.0

The GTK windowing system abstraction.

GdkMacos-4.0

GDK backend for macOS.

GdkWayland-4.0

GDK backend for Wayland.

GdkWin32-4.0

GDK backend for Windows.

GdkX11-4.0

GDK backend for X11.

Gsk-4.0

The GTK rendering API.

Gtk-4.0

The GTK toolkit — primary library for constructing user interfaces in GNOME applications.

GTK 3

Gdk-3.0

The GTK windowing system abstraction.

Gtk-3.0

The GTK toolkit — primary library for constructing user interfaces in GNOME applications.

Pango

Pango-1.0

Pango is a library for laying out and rendering text, with an emphasis on internationalization.

PangoCairo-1.0

Cairo rendering support for Pango.

Graphics

cairo-1.0

A 2D graphics library with support for multiple output devices.

GdkPixbuf-2.0

Image loading library.

GL-1.0

OpenGL type definitions for GObject Introspection.

Graphene-1.0

A thin layer of mathematical types for 3D libraries.

Rsvg-2.0

SVG rendering library.

xfixes-4.0

X11 XFixes extension type definitions.

xlib-2.0

X11 core protocol type definitions.

Text Rendering

freetype2-2.0

A freely available software library to render fonts.

HarfBuzz-0.0

A text shaping engine — converts Unicode text to glyph indices and positions.

Multimedia

GES-1.0

GStreamer Editing Services for non-linear video editing.

Grl-0.3

Framework for discovering and browsing media content.

GrlNet-0.3

Networking support for the Grilo media discovery framework.

Gst-1.0

Powerful framework for creating multimedia applications.

GstApp-1.0

GStreamer app library.

GstAudio-1.0

GStreamer Audio Library.

GstBase-1.0

GStreamer base plugin libraries.

GstGL-1.0

GStreamer OpenGL integration library.

GstPbutils-1.0

General application and plugin utility library.

GstPlayer-1.0

High-level media playback API.

GstSdp-1.0

GStreamer SDP (Session Description Protocol) library.

GstTag-1.0

GStreamer tag support library.

GstVideo-1.0

Support library for video operations.

GstWebRTC-1.0

WebRTC support for GStreamer.

GNOME Shell

Clutter-18

Scene graph toolkit used by Mutter for rendering.

Cogl-18

Low-level GPU graphics library used by Mutter.

Gvc-1.0

GNOME volume control library.

Meta-18

Window management and compositor library for GNOME.

Mtk-18

Mutter Toolkit utility library.

Shell-18

Core library of the GNOME Shell desktop.

Shew-0

Shell Extensions Helper window library.

St-18

GNOME Shell UI toolkit for building shell extensions.

Web

Goa-1.0

Framework for accessing online accounts.

JavaScriptCore-6.0

JavaScript engine used by WebKitGTK.

WebKit-6.0

A full-featured port of the WebKit rendering engine for GTK.

WebKitWebProcessExtension-6.0

Library for extensions running in WebKit's web process.

Networking

GSSDP-1.6

SSDP resource discovery and announcement library.

GUPnP-1.6

UPnP framework based on GObject and libsoup.

NM-1.0

Network management daemon and client library.

Rest-1.0

RESTful web service access library.

Soup-3.0

HTTP client/server library for GNOME.

Data & Markup

Json-1.0

A library providing serialization and deserialization support for the JSON format.

Jsonrpc-1.0

JSON-RPC protocol library.

libxml2-2.0

XML parsing and manipulation library.

Template-1.0

Template rendering library for GLib.

Tsparql-3.0

SPARQL database and query library.

Security

Gck-2

GObject wrapper for PKCS#11.

Gcr-4

Cryptographic and certificate UI library.

Polkit-1.0

Application-level toolkit for defining and handling authorization policies.

PolkitAgent-1.0

Polkit authentication agent library.

Secret-1

A library for accessing the Secret Service API of the freedesktop.org project.

System

AppStream-1.0

Software metadata handling library.

Flatpak-1.0

Library for managing Flatpak installations.

GUdev-1.0

GObject wrapper for libudev.

Libosinfo-1.0

Operating system information database.

Xdp-1.0

Desktop portals access library.

XdpGtk4-1.0

Desktop portals GTK 4 integration.

GNOME Desktop

Adw-1

Building blocks for modern adaptive GNOME applications.

Atk-1.0

Accessibility Toolkit interfaces (legacy, superseded by AT-SPI).

Atspi-2.0

Assistive Technology Service Provider Interface.

Dex-1

Deferred execution library for GLib.

GDesktopEnums-3.0

GNOME desktop settings enumerations.

GeocodeGlib-2.0

Geocoding and reverse geocoding helper library.

GtkSource-5

A GNOME library that extends GtkTextView with syntax highlighting, undo/redo, search and replace, a completion system, and other source code editing features.

GWeather-4.0

Weather data access library.

Notify-0.7

A library for sending desktop notifications.

Panel-1

IDE panel and dock library for GTK.

Peas-2

Application plugin engine.

Poppler-0.18

PDF rendering library.

Shumate-1.0

A library providing a widget to display maps in applications.

Spelling-1

Spell checking library for GTK.

Vte-3.91

Terminal emulator widget for GTK.

Wnck-3.0

Window Navigator Construction Kit.