# electron-typescript-definitions

> Automatically generated TypeScript definitions files for the Electron API

Latest version **8.3.0** (published 2019-04-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install electron-typescript-definitions
pnpm add electron-typescript-definitions
yarn add electron-typescript-definitions
bun add electron-typescript-definitions
```

Provides the command `electron-typescript-definitions`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 8.3.0 |
| Published | 2019-04-23 |
| First published | 2017-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 475.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 131 |
| Author | Samuel Attard |
| Maintainers | electron, felixrieseberg, marshallofsound, zcbenz, zeke |

## Links

- npm: https://www.npmjs.com/package/electron-typescript-definitions
- Repository: https://github.com/electron/electron-typescript-definitions
- Homepage: https://github.com/electron/electron-typescript-definitions#readme
- Issues: https://github.com/electron/electron-typescript-definitions/issues
- npm.io page: https://npm.io/package/electron-typescript-definitions

## Dependencies (10)

- [debug](https://npm.io/package/debug.md) ^2.6.3
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rimraf](https://npm.io/package/rimraf.md) ^2.5.4
- [tslint](https://npm.io/package/tslint.md) ^4.5.1
- [typescript](https://npm.io/package/typescript.md) ^2.2.1
- [@types/node](https://npm.io/package/@types/node.md) ^7.0.18
- [electron-docs](https://npm.io/package/electron-docs.md) ^2.0.0
- [electron-docs-linter](https://npm.io/package/electron-docs-linter.md) ^3.0.0

## Recent versions

- 8.3.0 (latest) — 2019-04-23
- 8.2.2 — 2019-03-11
- 8.2.1 — 2019-02-18
- 8.2.0 — 2019-02-18
- 8.1.1 — 2019-02-17
- 8.1.0 — 2019-02-15
- 8.0.0 — 2019-02-14
- 7.0.0 — 2019-02-13
- 6.0.0 — 2019-01-30
- 5.0.1 — 2019-01-30
- 5.0.0 — 2019-01-25
- 4.0.0 — 2019-01-18
- 3.0.0 — 2018-09-24
- 2.1.1 — 2018-09-20
- 2.1.0 — 2018-09-20
- … 28 more at https://npm.io/package/electron-typescript-definitions/versions

## README

# Electron TypeScript Definitions [![Build Status](https://travis-ci.org/electron/electron-typescript-definitions.svg?branch=master)](https://travis-ci.org/electron/electron-typescript-definitions)

This module uses Electron's [JSON API documentation](https://electron.atom.io/blog/2016/09/27/api-docs-json-schema) to produce a TypeScript definition file for the Electron API.

## Installation

```sh
npm install electron-typescript-definitions --save
```

## CLI Usage

To generate the definitions

```sh
electron-typescript-definitions --in=path/to/electron/api.json --out=path/to/electron.d.ts
```

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

```js
const generateDefinitions = require('electron-typescript-definitions')
const apiPath = './vendor/electron/docs/api.json'

const definitionLines = generateDefinitions(require(apiPath))
// definitionLines will be an array of file lines
```

## License

MIT

---
_Source: https://npm.io/package/electron-typescript-definitions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
