Skip to content

Commit

Permalink
docs(new): migrate TimeoutError to TSDoc (#6062)
Browse files Browse the repository at this point in the history
* docs(new): migrate TimeoutError to TSDoc

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
  • Loading branch information
OrKoN and OrKoN committed Jun 22, 2020
1 parent ace31d6 commit 1cf3f06
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion new-docs/puppeteer.md
Expand Up @@ -32,7 +32,7 @@
| [Puppeteer](./puppeteer.puppeteer.md) | The main Puppeteer 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](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |
| [Touchscreen](./puppeteer.touchscreen.md) | |
| [Tracing](./puppeteer.tracing.md) | |
| [WebWorker](./puppeteer.webworker.md) | The WebWorker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)<!-- -->. |
Expand Down
6 changes: 6 additions & 0 deletions new-docs/puppeteer.timeouterror.md
Expand Up @@ -4,10 +4,16 @@

## TimeoutError class

TimeoutError is emitted whenever certain operations are terminated due to timeout.

<b>Signature:</b>

```typescript
export declare class TimeoutError extends CustomError
```
<b>Extends:</b> CustomError
## Remarks
Example operations are [page.waitForSelector](./puppeteer.page.waitforselector.md) or [puppeteer.launch](./puppeteer.puppeteer.launch.md)<!-- -->.
10 changes: 10 additions & 0 deletions src/common/Errors.ts
Expand Up @@ -22,6 +22,16 @@ class CustomError extends Error {
}
}

/**
* TimeoutError is emitted whenever certain operations are terminated due to timeout.
*
* @remarks
*
* Example operations are {@link Page.waitForSelector | page.waitForSelector}
* or {@link Puppeteer.launch | puppeteer.launch}.
*
* @public
*/
export class TimeoutError extends CustomError {}

export type PuppeteerErrors = Record<string, typeof CustomError>;
Expand Down

0 comments on commit 1cf3f06

Please sign in to comment.