chore(docs): fix incorrect @returns on getter (#6175)

On a getter function you don't use `@returns` (as that's just for
methods). Instead we can just add to the general remarks to explain what
the property is providing.
This commit is contained in:
Jack Franklin 2020-07-08 10:29:58 +01:00 committed by GitHub
parent 12ee70f2cf
commit 6ee7139704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -12,6 +12,7 @@ get devices(): DevicesMap;
## Remarks ## Remarks
A list of devices to be used with `page.emulate(options)`<!-- -->. Actual list of devices can be found in [src/common/DeviceDescriptors.ts](https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts)<!-- -->.
## Example ## Example

View File

@ -14,7 +14,7 @@ get errors(): PuppeteerErrors;
Puppeteer methods might throw errors if they are unable to fulfill a request. For example, `page.waitForSelector(selector[, options])` might fail if the selector doesn't match any nodes during the given timeframe. Puppeteer methods might throw errors if they are unable to fulfill a request. For example, `page.waitForSelector(selector[, options])` might fail if the selector doesn't match any nodes during the given timeframe.
For certain types of errors Puppeteer uses specific error classes. These classes are available via `puppeteer.errors` For certain types of errors Puppeteer uses specific error classes. These classes are available via `puppeteer.errors`<!-- -->.
## Example ## Example

View File

@ -202,6 +202,8 @@ export class Puppeteer {
/** /**
* @remarks * @remarks
* A list of devices to be used with `page.emulate(options)`. Actual list of devices can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.
*
* @example * @example
* *
* ```js * ```js
@ -218,7 +220,6 @@ export class Puppeteer {
* })(); * })();
* ``` * ```
* *
* @returns a list of devices to be used with `page.emulate(options)`. Actual list of devices can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.
*/ */
get devices(): DevicesMap { get devices(): DevicesMap {
return devicesMap; return devicesMap;
@ -232,7 +233,8 @@ export class Puppeteer {
* the selector doesn't match any nodes during the given timeframe. * the selector doesn't match any nodes during the given timeframe.
* *
* For certain types of errors Puppeteer uses specific error classes. * For certain types of errors Puppeteer uses specific error classes.
* These classes are available via `puppeteer.errors` * These classes are available via `puppeteer.errors`.
*
* @example * @example
* An example of handling a timeout error: * An example of handling a timeout error:
* ```js * ```js