Socket
Socket
Sign inDemoInstall

@girs/gjs

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@girs/gjs

GJS TypeScript type definitions for Gjs


Version published
Weekly downloads
11K
increased by31.92%
Maintainers
1
Weekly downloads
 
Created
Source

Gjs

GJS TypeScript type definitions for Gjs using ts-for-gir v3.0.0-beta.16.

Install

To use this type definitions, install them with NPM:

npm install @girs/gjs

Usage

You can import this package into your project like this:

import Gjs from '@girs/gjs';

Or if you prefer CommonJS, you can also use this:

const Gjs = require('@girs/gjs');

Ambient Modules

You can import core ambient module types. For this you need to include the @girs/gjs or @girs/gjs/ambient in your tsconfig or entry point Typescript file:

index.ts:

import '@girs/gjs'

tsconfig.json:

{
  "compilerOptions": {
    ...
  },
  "include": ["@girs/gjs"],
  ...
}

Now you can import gettext and system in ESM style with Typescript support:

import gettext from 'gettext';
import system from 'system';

If you want to have more types for GIR modules, you have to add them to your dependencies and import them as well, see the description of these modules, e.g. Gtk-4.0.

Bundle

Depending on your project configuration, it is recommended to use a bundler like esbuild. You can find examples using different bundlers here.

Other packages

All existing pre-generated packages can be found on gjsify/types.

Keywords

FAQs

Package last updated on 21 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc