chore(docs): tidy Puppeteer class docs (#6181)

* Mark properties as `private` or `@internal` so they don't get
  documented.
* Fix the `@returns` on a getter which gets ignored.
This commit is contained in:
Jack Franklin 2020-07-09 14:49:27 +01:00 committed by GitHub
parent 24cb6a28ad
commit 03a87e814d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 58 deletions

View File

@ -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. | | [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. | | [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. | | [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. | | [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) | | | [Target](./puppeteer.target.md) | |
| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. | | [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Puppeteer](./puppeteer.puppeteer.md) &gt; [\_\_productName](./puppeteer.puppeteer.__productname.md)
## Puppeteer.\_\_productName property
<b>Signature:</b>
```typescript
__productName: string;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Puppeteer](./puppeteer.puppeteer.md) &gt; [\_changedProduct](./puppeteer.puppeteer._changedproduct.md)
## Puppeteer.\_changedProduct property
<b>Signature:</b>
```typescript
_changedProduct: boolean;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Puppeteer](./puppeteer.puppeteer.md) &gt; [\_isPuppeteerCore](./puppeteer.puppeteer._ispuppeteercore.md)
## Puppeteer.\_isPuppeteerCore property
<b>Signature:</b>
```typescript
_isPuppeteerCore: boolean;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Puppeteer](./puppeteer.puppeteer.md) &gt; [\_preferredRevision](./puppeteer.puppeteer._preferredrevision.md)
## Puppeteer.\_preferredRevision property
<b>Signature:</b>
```typescript
_preferredRevision: string;
```

View File

@ -4,7 +4,9 @@
## Puppeteer class ## 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> <b>Signature:</b>
@ -37,13 +39,9 @@ const puppeteer = require('puppeteer');
| Property | Modifiers | Type | Description | | 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) | | | [devices](./puppeteer.puppeteer.devices.md) | | [DevicesMap](./puppeteer.devicesmap.md) | |
| [errors](./puppeteer.puppeteer.errors.md) | | [PuppeteerErrors](./puppeteer.puppeteererrors.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 ## Methods

View File

@ -4,6 +4,8 @@
## Puppeteer.product property ## Puppeteer.product property
The name of the browser that is under automation (`"chrome"` or `"firefox"`<!-- -->)
<b>Signature:</b> <b>Signature:</b>
```typescript ```typescript

View File

@ -35,8 +35,11 @@ import {
import { PUPPETEER_REVISIONS } from '../revisions'; import { PUPPETEER_REVISIONS } from '../revisions';
/** /**
* The main Puppeteer class * The main Puppeteer class. Provides the {@link Puppeteer.launch | launch}
* Puppeteer module provides a method to launch a browser instance. * method to launch a browser.
*
* When you `require` or `import` the Puppeteer npm package you get back an
* instance of this class.
* *
* @remarks * @remarks
* *
@ -57,11 +60,14 @@ import { PUPPETEER_REVISIONS } from '../revisions';
*/ */
export class Puppeteer { export class Puppeteer {
private _projectRoot: string; private _projectRoot: string;
_preferredRevision: string; private _isPuppeteerCore: boolean;
_isPuppeteerCore: boolean; private _changedProduct = false;
_changedProduct = false; private __productName: string;
__productName: string;
private _lazyLauncher: ProductLauncher; private _lazyLauncher: ProductLauncher;
/**
* @internal
*/
_preferredRevision: string;
/** /**
* @internal * @internal
@ -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 * @remarks
* The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` * The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product`