This project adheres to Electron's code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to coc@electronjs.org.
Building locally to try out changes can be done this way:
$ git clone git@github.com:electron/typescript-definitions.git
$ cd typescript-definitions
$ yarn install
$ # make your changes...
$ yarn build
To run it, first you'll need a electron-api.json
file. There are a few common ways to get this:
From a electron/docs-parser repo (since working on this often goes hand-in-hand wth typescript-definitions):
$ cd docs-parser
$ yarn install
$ yarn build && node dist/bin.js --dir /path/to/electron-gn/src/electron --moduleVersion 1.2.3
From a electron/electron repo:
$ cd /path/to/electron-gn/src/electron
$ npm install
$ npm run create-api-json
Either way, once you have electron-api.json
, run it through the typescript generator:
$ cd typescript-definitions
$ yarn build && node dist/bin.js --api /path/to/electron-api.json