build: move to the new docs parser (#18103)

* build: move to the new docs parser

* chore: remove the bad getTitle param doc

* build: update parser/ts gen deps + fix some docs issues highlighted by GH desktop

* chore: apply suggestions from code review

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>

* chore: update docs for accidentally removed things

* chore: update docs/api/command-line.md

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
This commit is contained in:
Samuel Attard 2019-05-06 08:29:01 -07:00 committed by John Kleinschmidt
parent 9ec59cbc6c
commit a96b6e2c96
28 changed files with 461 additions and 1234 deletions

View file

@ -1,5 +1,3 @@
import { EventEmitter } from 'electron';
/**
* @fileoverview A set of helper functions to make it easier to work
* with events in async/await manner.
@ -21,11 +19,11 @@ export const waitForEvent = (target: EventTarget, eventName: string) => {
* @param {string} eventName
* @return {!Promise<!Array>} With Event as the first item.
*/
export const emittedOnce = (emitter: EventEmitter, eventName: string) => {
export const emittedOnce = (emitter: NodeJS.EventEmitter, eventName: string) => {
return emittedNTimes(emitter, eventName, 1).then(([result]) => result)
}
export const emittedNTimes = (emitter: EventEmitter, eventName: string, times: number) => {
export const emittedNTimes = (emitter: NodeJS.EventEmitter, eventName: string, times: number) => {
const events: any[][] = []
return new Promise<any[][]>(resolve => {
const handler = (...args: any[]) => {