@electron/typescript-definitions

9.1.2 • Public • Published

Electron TypeScript Definitions

This module uses Electron's JSON API documentation to produce a TypeScript definition file for the Electron API.

Test npm version

Installation

npm install @electron/typescript-definitions --save

CLI Usage

To generate the definitions

electron-typescript-definitions --api=path/to/electron/api.json --out-dir=path/to/out/dir

Any warnings during the generation can normally be ignored unless it actually throws an error

Programmatic Usage

The module exports a function that parses a given API JSON object and returns an array of lines to create the definition file

import { generateDefinitions } from '@electron/typescript-definitions'

const apiPath = './vendor/electron/docs/api.json'

const definitionLines = generateDefinitions({ electronApi: loadJSON(apiPath) })
// definitionLines will be an string representation of the definition file

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
9.1.2
840latest

Version History

VersionDownloads (Last 7 Days)Published
9.1.2
840
9.1.1
0
9.1.00
9.0.0507
8.15.81,013
8.15.76
8.15.644
8.15.50
8.15.40
8.15.38
8.15.214
8.15.10
8.15.00
8.14.80
8.14.70
8.14.61
8.14.512
8.14.40
8.14.30
8.14.13
8.14.030
8.13.00
8.12.20
8.12.10
8.12.00
8.11.00
8.10.082
8.9.70
8.9.613
8.9.51
8.9.40
8.9.30
8.9.20
8.9.10
8.9.00
8.8.03
8.7.90
8.7.82
8.7.70
8.7.60
8.7.50
8.7.40
8.7.30
8.7.20
8.7.10
8.7.00
8.6.70
8.6.60
8.6.50
8.6.47
8.6.30
8.6.20
8.6.10
8.6.00
8.5.20
8.5.10
8.5.00
8.4.00
8.3.50
8.3.40
8.3.30
8.3.20
8.3.10
0.0.0-development0

Package Sidebar

Install

npm i @electron/typescript-definitions

Weekly Downloads

2,586

Version

9.1.2

License

MIT

Unpacked Size

109 kB

Total Files

20

Last publish

Collaborators

  • electron-cfa