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. |
| [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. |

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
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>
@ -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

View File

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

View File

@ -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
*
@ -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
@ -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`