Module

GDesktopEnums-3.0

Namespaces

GDesktopEnums

References

defaultGDesktopEnums-3.0.GDesktopEnums

Readme

GDesktopEnums-3.0

version downloads/week

GJS TypeScript type definitions for GDesktopEnums-3.0 using ts-for-gir v5.2.0.

This package contains type declarations only. It ships no runtime code, so it adds nothing to your program and works with any bundler or none at all.

npm install @girs/gdesktopenums-3.0

Any package manager works. The package has no dependencies beyond other @girs/* type packages.

Import What you get
@girs/gdesktopenums-3.0 the namespace as a default export, plus the ambient and global declarations
@girs/gdesktopenums-3.0/ambient only the gi:// module declarations
@girs/gdesktopenums-3.0/import only the imports.gi declarations
@girs/gdesktopenums-3.0/gdesktopenums-3.0 the namespace, without the side-effecting declarations

Which one you use depends on how you write imports elsewhere, not on your toolchain.

import GDesktopEnums from '@girs/gdesktopenums-3.0';

GJS resolves gi:// at runtime. To give it types, reference the package once, either from your entry point or from tsconfig.json:

import '@girs/gdesktopenums-3.0';
{ "include": ["@girs/gdesktopenums-3.0"] }

Then the runtime spelling type-checks:

import GDesktopEnums from 'gi://GDesktopEnums?version=3.0';

Referencing @girs/gdesktopenums-3.0/ambient instead pulls in these declarations alone. See ambient modules.

GJS's global object works the same way, via @girs/gdesktopenums-3.0/import:

const GDesktopEnums = imports.gi.GDesktopEnums;

The declarations need no build step. If you bundle, every bundler works, since there is no runtime code to resolve. The examples show working setups for several.

Every pre-generated package is at gjsify/types.