Skip to content

Commit

Permalink
chore(docs): tidy Puppeteer class docs (#6181)
Browse files Browse the repository at this point in the history
* Mark properties as `private` or `@internal` so they don't get
  documented.
* Fix the `@returns` on a getter which gets ignored.
  • Loading branch information
jackfranklin committed Jul 9, 2020
1 parent 24cb6a2 commit 03a87e8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 58 deletions.
2 changes: 1 addition & 1 deletion new-docs/puppeteer.md
Expand Up @@ -27,7 +27,7 @@
| [Keyboard](./puppeteer.keyboard.md) | Keyboard provides an api for managing a virtual keyboard. The high level api is [Keyboard.type()](./puppeteer.keyboard.type.md)<!-- -->, which takes raw characters and generates proper keydown, keypress/input, and keyup events on your page. |
| [Mouse](./puppeteer.mouse.md) | The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. |
| [Page](./puppeteer.page.md) | Page provides methods to interact with a single tab or [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. |
| [Puppeteer](./puppeteer.puppeteer.md) | The main Puppeteer class Puppeteer module provides a method to launch a browser instance. |
| [Puppeteer](./puppeteer.puppeteer.md) | The main Puppeteer class. Provides the [launch](./puppeteer.puppeteer.launch.md) method to launch a browser.<!-- -->When you <code>require</code> or <code>import</code> the Puppeteer npm package you get back an instance of this class. |
| [SecurityDetails](./puppeteer.securitydetails.md) | The SecurityDetails class represents the security details of a response that was received over a secure connection. |
| [Target](./puppeteer.target.md) | |
| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |
Expand Down
11 changes: 0 additions & 11 deletions new-docs/puppeteer.puppeteer.__productname.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.puppeteer._changedproduct.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.puppeteer._ispuppeteercore.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.puppeteer._preferredrevision.md

This file was deleted.

10 changes: 4 additions & 6 deletions new-docs/puppeteer.puppeteer.md
Expand Up @@ -4,7 +4,9 @@

## Puppeteer class

The main Puppeteer class Puppeteer module provides a method to launch a browser instance.
The main Puppeteer class. Provides the [launch](./puppeteer.puppeteer.launch.md) method to launch a browser.

When you `require` or `import` the Puppeteer npm package you get back an instance of this class.

<b>Signature:</b>

Expand Down Expand Up @@ -37,13 +39,9 @@ const puppeteer = require('puppeteer');

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [\_\_productName](./puppeteer.puppeteer.__productname.md) | | string | |
| [\_changedProduct](./puppeteer.puppeteer._changedproduct.md) | | boolean | |
| [\_isPuppeteerCore](./puppeteer.puppeteer._ispuppeteercore.md) | | boolean | |
| [\_preferredRevision](./puppeteer.puppeteer._preferredrevision.md) | | string | |
| [devices](./puppeteer.puppeteer.devices.md) | | [DevicesMap](./puppeteer.devicesmap.md) | |
| [errors](./puppeteer.puppeteer.errors.md) | | [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |
| [product](./puppeteer.puppeteer.product.md) | | string | |
| [product](./puppeteer.puppeteer.product.md) | | string | The name of the browser that is under automation (<code>&quot;chrome&quot;</code> or <code>&quot;firefox&quot;</code>) |

## Methods

Expand Down
2 changes: 2 additions & 0 deletions new-docs/puppeteer.puppeteer.product.md
Expand Up @@ -4,6 +4,8 @@

## Puppeteer.product property

The name of the browser that is under automation (`"chrome"` or `"firefox"`<!-- -->)

<b>Signature:</b>

```typescript
Expand Down
20 changes: 13 additions & 7 deletions src/common/Puppeteer.ts
Expand Up @@ -35,8 +35,11 @@ import {
import { PUPPETEER_REVISIONS } from '../revisions';

/**
* The main Puppeteer class
* Puppeteer module provides a method to launch a browser instance.
* The main Puppeteer class. Provides the {@link Puppeteer.launch | launch}
* method to launch a browser.
*
* When you `require` or `import` the Puppeteer npm package you get back an
* instance of this class.
*
* @remarks
*
Expand All @@ -57,11 +60,14 @@ import { PUPPETEER_REVISIONS } from '../revisions';
*/
export class Puppeteer {
private _projectRoot: string;
_preferredRevision: string;
_isPuppeteerCore: boolean;
_changedProduct = false;
__productName: string;
private _isPuppeteerCore: boolean;
private _changedProduct = false;
private __productName: string;
private _lazyLauncher: ProductLauncher;
/**
* @internal
*/
_preferredRevision: string;

/**
* @internal
Expand Down Expand Up @@ -189,7 +195,7 @@ export class Puppeteer {
}

/**
* @returns The name of the browser that is under automation (`"chrome"` or `"firefox"`)
* The name of the browser that is under automation (`"chrome"` or `"firefox"`)
*
* @remarks
* The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product`
Expand Down

0 comments on commit 03a87e8

Please sign in to comment.