🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

electron-definitelytyped

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-definitelytyped

Automatically generated definitely typed files for the Electron API

latest
npmnpm
Version
0.0.9
Version published
Weekly downloads
20
400%
Maintainers
4
Weekly downloads
 
Created
Source

electron-DefinitelyTyped Build Status

Parse Electron's JSON API documentation and spit out a typescript definition file

Installation

npm install electron-DefinitelyTyped --save

CLI Usage

To generate the definitions

electron-DefinitelyTyped --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

const generateDefinitions = require('electron-DefinitelyTyped')
const apiPath = './vendor/electron/docs/api.json'

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

License

MIT

FAQs

Package last updated on 25 Nov 2016

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