Skip to content

Commit

Permalink
Mark optional params in JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
CvX committed Jan 28, 2019
1 parent babba86 commit 17b9c8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function activeWindow(): Electron.BrowserWindow;
* Run some JavaScript in the active or given window.
*
* @param code - TODO
* @param window - Default: Current window
* @param [window] - Default: Current window
* @returns A promise for the result of the executed code or a rejected promise if the result is a rejected promise.
*/
export function runJS(code: string, window?: Electron.BrowserWindow): Promise<unknown>;
Expand Down Expand Up @@ -267,7 +267,7 @@ export function centerWindow(options?: Readonly<CenterWindowOptions>): void;
/**
* Disable zooming, usually caused by pinching the trackpad on macOS or Ctrl+ on Windows.
*
* @param window - Default: Current window
* @param [window] - Default: Current window
*/
export function disableZoom(window?: Electron.BrowserWindow): void;

Expand Down Expand Up @@ -495,7 +495,7 @@ export function debugInfo(): string;
* Creating the [app menu](https://developer.apple.com/design/human-interface-guidelines/macos/menus/menu-bar-menus/) (the first menu) on macOS requires [a lot of boilerplate](https://github.com/sindresorhus/caprine/blob/5361289d1058b9463946f274cbfef587e6ad24a3/menu.js#L381-L431).
* This method includes the default boilerplate and lets you add additional menu items in the correct place.
*
* @param menuItems - Menu items to add below the `About App Nem` menu item. Usually, you would add at least a `Preferences…` menu item
* @param [menuItems] - Menu items to add below the `About App Nem` menu item. Usually, you would add at least a `Preferences…` menu item
* @returns TODO
*
* @example
Expand Down

0 comments on commit 17b9c8f

Please sign in to comment.