Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript definition #11

Merged
merged 18 commits into from
Jan 29, 2019
Prev Previous commit
Next Next commit
Revert "Mark optional params in JSDoc"
This reverts commit 17b9c8f.

# Conflicts:
#	index.d.ts
  • Loading branch information
CvX committed Jan 28, 2019
commit 0c53e6b9929eb4e2bcb1cb3e006e5aa99a5a680b
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function activeWindow(): 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?: BrowserWindow): Promise<unknown>;
Expand Down Expand Up @@ -269,7 +269,7 @@ export function centerWindow(options?: 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?: BrowserWindow): void;

Expand Down Expand Up @@ -497,7 +497,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 Name` menu item. Usually, you would add at least a `Preferences…` menu item.
* @param menuItems - Menu items to add below the `About App Name` menu item. Usually, you would add at least a `Preferences…` menu item.
* @returns TODO
*
* @example
Expand Down