GNOME Runtime TypeScript types
npm install @peachy/typesThis repo contains auto-generated types from the master GNOME SDK.
``bash`
npm install @peachy/types
`json`
{
"compilerOptions": {
"include": ["@peachy/types", "src"]
}
}
Then in your application you can use GJS types
`ts
// src/index.ts
import Gtk from "gi://Gtk?version=4.0"
const label = new Gtk.Label();
`
To update the types here, follow these steps
Clone this repo, and make sure you have an updated installation of GNOME SDK and the node24
`sh`
flatpak install org.gnome.Sdk//master org.freedesktop.Sdk.Extension.node24
Then run this to update the types
`sh``
./generate_types_in_flatpak.sh
- [ ] Setup CI to automatically update these types