c419cea8f2
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.github | ||
.husky | ||
.vscode | ||
base | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
.prettierrc.json | ||
.releaserc.json | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
jest.config.js | ||
package.json | ||
tsconfig.json | ||
yarn.lock |
README.md
Electron TypeScript Definitions
This module uses Electron's JSON API documentation to produce a TypeScript definition file for the Electron API.
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