Skip to content

Commit 6ee7139

Browse files
authoredJul 8, 2020
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.
1 parent 12ee70f commit 6ee7139

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

Diff for: ‎new-docs/puppeteer.puppeteer.devices.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ get devices(): DevicesMap;
1212

1313
## Remarks
1414

15+
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)<!-- -->.
1516

1617
## Example
1718

Diff for: ‎new-docs/puppeteer.puppeteer.errors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ get errors(): PuppeteerErrors;
1414

1515
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.
1616

17-
For certain types of errors Puppeteer uses specific error classes. These classes are available via `puppeteer.errors`
17+
For certain types of errors Puppeteer uses specific error classes. These classes are available via `puppeteer.errors`<!-- -->.
1818

1919
## Example
2020

Diff for: ‎src/common/Puppeteer.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ export class Puppeteer {
202202

203203
/**
204204
* @remarks
205+
* 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}.
206+
*
205207
* @example
206208
*
207209
* ```js
@@ -218,7 +220,6 @@ export class Puppeteer {
218220
* })();
219221
* ```
220222
*
221-
* @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}.
222223
*/
223224
get devices(): DevicesMap {
224225
return devicesMap;
@@ -232,7 +233,8 @@ export class Puppeteer {
232233
* the selector doesn't match any nodes during the given timeframe.
233234
*
234235
* For certain types of errors Puppeteer uses specific error classes.
235-
* These classes are available via `puppeteer.errors`
236+
* These classes are available via `puppeteer.errors`.
237+
*
236238
* @example
237239
* An example of handling a timeout error:
238240
* ```js

0 commit comments

Comments
 (0)
Please sign in to comment.