TypeScript type definition generator for GObject introspection interfaces
APACHE-2.0 License
Bot releases are visible (Hide)
.gir
files.gir
from latest version in Fedora Workstation 41 BetaFull Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.15...4.0.0-beta.16
Published by JumpLink about 2 months ago
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.14...4.0.0-beta.15
Published by JumpLink 3 months ago
console
Object.$gtype
(not GObject.Object.$gtype
)Full Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.12...4.0.0-beta.14
Published by JumpLink 3 months ago
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.11...4.0.0-beta.12
Published by JumpLink 3 months ago
Published by JumpLink 3 months ago
Add support for $gtype
for enums.
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.8...4.0.0-beta.10
Published by JumpLink 3 months ago
Improved GJS package core types
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/4.0.0-beta.7...4.0.0-beta.8
Published by JumpLink 3 months ago
We have just updated ts-for-gir
to 4.0.0-beta.7
. Types can now be generated locally without package.json
support, which is now the default. You can try it out directly with:
npx @ts-for-gir/cli generate Adw-1.0
This will generate the types for Libadwaita and all its dependencies, including Gtk 4.0, GObject 2.0, etc.
If you still want to generate types with package.json
support, simply use the --package
CLI argument. We have also updated them on NPM, including the upcoming types for GNOME Shell 47.
Allow toggling between package.json
support and further cleanups from the gi.ts merge by @JumpLink in #176:
packageYarn
to workspace
as other package managers such as PNPM also support this protocol.onlyVersionPrefix
. This fixes Allow all versions to be imported without a version string (e.g. gi://Gtk instead of gi://Gtk?version=4.0)
in #158 and possibly #174.index.d.ts
file is now created for each module, allowing everything for the module (ambient module, imports.gi, and namespace) to be imported.package.json
support to fix #168 and #173. For this, there is a new CLI argument package
to toggle package.json
support.Full Changelog: https://github.com/gjsify/ts-for-gir/compare/v4.0.0-beta.6...v4.0.0-beta.7
Published by JumpLink 3 months ago
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/v4.0.0-beta.2...v4.0.0-beta.6
Published by JumpLink 7 months ago
We are thrilled to announce the first beta release of new TypeScript bindings for GNOME! These bindings combine the efforts of ts-for-gir
and gi.ts
into a unified project under the gjsify organization. Since we announced this effort at GUADEC 2023, @JumpLink and @ewlsh have been working continuously to identify areas for improvement in the bindings and how best to merge these two sprawling codebases. This fusion marks a significant milestone in our journey towards enhancing the TypeScript ecosystem for GJS and GObject-based libraries. Our collaboration shows the power of community-driven development and the remarkable achievements that can be realized when we join forces towards a common objective 🤝
We have also removed some features, such as support for Node.js and CommonJS. Types for Node.js can still be generated via v3.x.x, and we are open to contributions in this area. However, there has been limited feedback from the community so far, leading us to focus on GJS for the time being. Furthermore, ESM represents the future and has already become the standard within GJS. This move also enables us to publish types on https://jsr.io/, a runtime-independent JavaScript and TypeScript open-source package registry created by the makers of Deno, where CommonJS is not allowed.
The new bindings have been published on NPM with the next
tag and are ready for testing. We've tried to minimize breaking changes whereever possible and hopefully with new, advanced types the bindings just "work" 😊
We're excited to see what the future holds for JavaScript and TypeScript in GNOME!
Full Changelog: https://github.com/gjsify/ts-for-gir/compare/v3.3.0...v4.0.0-beta.2
Published by JumpLink 7 months ago
TypeScript type definition generator for GObject introspection GIR files
xml2js
with fast-xml-parser
(Backport from gi.ts merge branch)Full Changelog: https://github.com/gjsify/ts-for-gir/compare/v3.2.8...v3.3.0
Published by JumpLink 8 months ago
byteArray.toString()
dom.js
, ambient.js
and node-ambient.js
to allow importing there type definitions in the codebase with a bundlersystem
gtk-4-application
exampleunderscore
properties (next to lowerCamelCase
) in the generated types, if this causes problems please let us know, then we will undo it againFull Changelog: https://github.com/gjsify/ts-for-gir/compare/v3.2.7...v3.2.8
Published by JumpLink 10 months ago
const
is readonly in typescriptrunAsync
override for GLib.MainLoop
, see #130GnomeBluetooth-3.0.gir
on Fedora./girs
directoryFull Changelog: https://github.com/gjsify/ts-for-gir/compare/v3.2.0...v3.2.7
Published by JumpLink over 1 year ago
Published by JumpLink over 1 year ago
dom.d.ts
for optional importMove conflicting global GJS types to dom.d.ts
, allowing you to optionally import them in your project. By doing so, you have the flexibility to choose whether or not to include these types based on your specific needs. This resolves the conflict between the GJS and DOM types and provides you with more control over managing the type definitions.
To use the previous behavior and include the conflicting GJS types, you can import both ./@types/gjs.d.ts
and ./@types/dom.d.ts
in your code.
Alternatively, if you are using the NPM packages, you can import the following:
@girs/gjs
: This package provides the GJS types.@girs/gjs/dom
: This package provides the conflicting DOM types.Please update your imports accordingly based on your chosen approach.
Published by JumpLink over 1 year ago
Published by JumpLink over 1 year ago
xml2js
, see #125)package.json
templates
, packages.xml
, package-data-parser.ts
and template-processor.ts
from @ts-for-gir/lib
to @ts-for-gir/generator-typescript
./package.json
Published by JumpLink over 1 year ago
Add missing packages.xml
to @ts-for-gir/lib
Published by JumpLink over 1 year ago
🎉 ts-for-gir v3.0.0 is here! 🚀
This stable release brings exciting new features and improvements to ts-for-gir.
@gir/gjs
and @gir/node-gtk
)Published by JumpLink over 1 year ago
XDG_DATA_DIRS
environment variable, this fixes ts-for-gir on NixOS. See #107 by @samdroid-apps