chore(docs): fix tsdoc warnings

* fix: added script

* fix: updated script

* fix: updated script

* fix: added comment

* fix: added comments

* fix: connection method to public

* fix: removed incorrect tags

* fix: some of the warnings
This commit is contained in:
TASNEEM KOUSHAR 2021-07-12 15:12:44 +05:30 committed by GitHub
parent d70f60e061
commit 2a403d1973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 31 deletions

View File

@ -492,7 +492,6 @@ export class Mouse {
* Dispatches a `drag` event. * Dispatches a `drag` event.
* @param start - starting point for drag * @param start - starting point for drag
* @param target - point to drag to * @param target - point to drag to
* ```
*/ */
async drag(start: Point, target: Point): Promise<Protocol.Input.DragData> { async drag(start: Point, target: Point): Promise<Protocol.Input.DragData> {
const promise = new Promise<Protocol.Input.DragData>((resolve) => { const promise = new Promise<Protocol.Input.DragData>((resolve) => {
@ -509,7 +508,6 @@ export class Mouse {
/** /**
* Dispatches a `dragenter` event. * Dispatches a `dragenter` event.
* @param target - point for emitting `dragenter` event * @param target - point for emitting `dragenter` event
* ```
*/ */
async dragEnter(target: Point, data: Protocol.Input.DragData): Promise<void> { async dragEnter(target: Point, data: Protocol.Input.DragData): Promise<void> {
await this._client.send('Input.dispatchDragEvent', { await this._client.send('Input.dispatchDragEvent', {
@ -524,7 +522,6 @@ export class Mouse {
/** /**
* Dispatches a `dragover` event. * Dispatches a `dragover` event.
* @param target - point for emitting `dragover` event * @param target - point for emitting `dragover` event
* ```
*/ */
async dragOver(target: Point, data: Protocol.Input.DragData): Promise<void> { async dragOver(target: Point, data: Protocol.Input.DragData): Promise<void> {
await this._client.send('Input.dispatchDragEvent', { await this._client.send('Input.dispatchDragEvent', {
@ -543,7 +540,6 @@ export class Mouse {
* @param options - An object of options. Accepts delay which, * @param options - An object of options. Accepts delay which,
* if specified, is the time to wait between `dragover` and `drop` in milliseconds. * if specified, is the time to wait between `dragover` and `drop` in milliseconds.
* Defaults to 0. * Defaults to 0.
* ```
*/ */
async drop(target: Point, data: Protocol.Input.DragData): Promise<void> { async drop(target: Point, data: Protocol.Input.DragData): Promise<void> {
await this._client.send('Input.dispatchDragEvent', { await this._client.send('Input.dispatchDragEvent', {
@ -562,7 +558,6 @@ export class Mouse {
* @param options - An object of options. Accepts delay which, * @param options - An object of options. Accepts delay which,
* if specified, is the time to wait between `dragover` and `drop` in milliseconds. * if specified, is the time to wait between `dragover` and `drop` in milliseconds.
* Defaults to 0. * Defaults to 0.
* ```
*/ */
async dragAndDrop( async dragAndDrop(
start: Point, start: Point,

View File

@ -1636,10 +1636,9 @@ export class Page extends EventEmitter {
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} * or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
* methods. * methods.
* *
* - `waitUntil`: <"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|Array> * - `waitUntil`: When to consider setting markup succeeded, defaults to `load`.
* When to consider setting markup succeeded, defaults to `load`. Given an * Given an array of event strings, setting content is considered to be
* array of event strings, setting content is considered to be successful * successful after all events have been fired. Events can be either:<br/>
* after all events have been fired. Events can be either:<br/>
* - `load` : consider setting content to be finished when the `load` event is * - `load` : consider setting content to be finished when the `load` event is
* fired.<br/> * fired.<br/>
* - `domcontentloaded` : consider setting content to be finished when the * - `domcontentloaded` : consider setting content to be finished when the
@ -1671,11 +1670,9 @@ export class Page extends EventEmitter {
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} * or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
* methods. * methods.
* *
* - `waitUntil`: * - `waitUntil`:When to consider navigation succeeded, defaults to `load`.
* <"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|Array> When to * Given an array of event strings, navigation is considered to be successful
* consider navigation succeeded, defaults to `load`. Given an array of * after all events have been fired. Events can be either:<br/>
* event strings, navigation is considered to be successful after all events
* have been fired. Events can be either:<br/>
* - `load` : consider navigation to be finished when the load event is * - `load` : consider navigation to be finished when the load event is
* fired.<br/> * fired.<br/>
* - `domcontentloaded` : consider navigation to be finished when the * - `domcontentloaded` : consider navigation to be finished when the
@ -1735,10 +1732,9 @@ export class Page extends EventEmitter {
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} * or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
* methods. * methods.
* *
* - `waitUntil`: <"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|Array> * - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
* When to consider navigation succeeded, defaults to `load`. Given an array * Given an array of event strings, navigation is considered to be
* of event strings, navigation is considered to be successful after all * successful after all events have been fired. Events can be either:<br/>
* events have been fired. Events can be either:<br/>
* - `load` : consider navigation to be finished when the load event is fired.<br/> * - `load` : consider navigation to be finished when the load event is fired.<br/>
* - `domcontentloaded` : consider navigation to be finished when the * - `domcontentloaded` : consider navigation to be finished when the
* DOMContentLoaded event is fired.<br/> * DOMContentLoaded event is fired.<br/>
@ -1905,10 +1901,9 @@ export class Page extends EventEmitter {
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} * or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
* methods. * methods.
* *
* - `waitUntil` : <"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|Array> * - `waitUntil` : When to consider navigation succeeded, defaults to `load`.
* When to consider navigation succeeded, defaults to `load`. Given an array * Given an array of event strings, navigation is considered to be
* of event strings, navigation is considered to be successful after all * successful after all events have been fired. Events can be either:<br/>
* events have been fired. Events can be either:<br/>
* - `load` : consider navigation to be finished when the load event is fired.<br/> * - `load` : consider navigation to be finished when the load event is fired.<br/>
* - `domcontentloaded` : consider navigation to be finished when the * - `domcontentloaded` : consider navigation to be finished when the
* DOMContentLoaded event is fired.<br/> * DOMContentLoaded event is fired.<br/>
@ -1938,10 +1933,9 @@ export class Page extends EventEmitter {
* or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)} * or {@link Page.setDefaultTimeout | page.setDefaultTimeout(timeout)}
* methods. * methods.
* *
* - `waitUntil`: <"load"|"domcontentloaded"|"networkidle0"|"networkidle2"|Array> * - `waitUntil`: When to consider navigation succeeded, defaults to `load`.
* When to consider navigation succeeded, defaults to `load`. Given an array * Given an array of event strings, navigation is considered to be
* of event strings, navigation is considered to be successful after all * successful after all events have been fired. Events can be either:<br/>
* events have been fired. Events can be either:<br/>
* - `load` : consider navigation to be finished when the load event is fired.<br/> * - `load` : consider navigation to be finished when the load event is fired.<br/>
* - `domcontentloaded` : consider navigation to be finished when the * - `domcontentloaded` : consider navigation to be finished when the
* DOMContentLoaded event is fired.<br/> * DOMContentLoaded event is fired.<br/>
@ -2272,7 +2266,7 @@ export class Page extends EventEmitter {
* await page.goto('https://example.com'); * await page.goto('https://example.com');
* ``` * ```
* *
* @param viewport * @param viewport -
* @remarks * @remarks
* Argument viewport have following properties: * Argument viewport have following properties:
* *
@ -2721,7 +2715,7 @@ export class Page extends EventEmitter {
} }
/** /**
* @param {!PDFOptions=} options * @param {!PDFOptions=} options -
* @returns {!Promise<!Buffer>} * @returns {!Promise<!Buffer>}
*/ */
async pdf(options: PDFOptions = {}): Promise<Buffer> { async pdf(options: PDFOptions = {}): Promise<Buffer> {
@ -2848,8 +2842,9 @@ export class Page extends EventEmitter {
* page.select('select#colors', 'blue'); // single selection * page.select('select#colors', 'blue'); // single selection
* page.select('select#colors', 'red', 'green', 'blue'); // multiple selections * page.select('select#colors', 'red', 'green', 'blue'); // multiple selections
* ``` * ```
* @param selector - A {@link https://developer.mozilla.org/en-US/docs/Web/CSS/ * @param selector - A
* CSS_Selectors | Selector} to query the page for * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | Selector}
* to query the page for
* @param values - Values of options to select. If the `<select>` has the * @param values - Values of options to select. If the `<select>` has the
* `multiple` attribute, all values are considered, otherwise only the first one * `multiple` attribute, all values are considered, otherwise only the first one
* is taken into account. * is taken into account.
@ -2898,7 +2893,8 @@ export class Page extends EventEmitter {
* @param options - have property `delay` which is the Time to wait between * @param options - have property `delay` which is the Time to wait between
* key presses in milliseconds. Defaults to `0`. * key presses in milliseconds. Defaults to `0`.
* @returns * @returns
* {@link page.mainFrame().type(selector, text[, options])} * @remarks
* Shortcut for {@link page.mainFrame().type(selector, text[, options])}
*/ */
type( type(
selector: string, selector: string,