From d541e975ae74c704157153996d622b2d16c75a59 Mon Sep 17 00:00:00 2001 From: TASNEEM KOUSHAR Date: Fri, 9 Jul 2021 13:42:01 +0530 Subject: [PATCH] chore: documentation improvements --- api-extractor.json | 2 +- src/common/Connection.ts | 2 +- src/common/Page.ts | 51 ++++++++++++++++++++-------------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/api-extractor.json b/api-extractor.json index 102fd42b..615f57fd 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -2,7 +2,7 @@ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "/lib/cjs/puppeteer/api-docs-entry.d.ts", "bundledPackages": ["devtools-protocol"], - + "apiReport": { "enabled": false }, diff --git a/src/common/Connection.ts b/src/common/Connection.ts index 34aab7df..865e9833 100644 --- a/src/common/Connection.ts +++ b/src/common/Connection.ts @@ -48,7 +48,7 @@ export const ConnectionEmittedEvents = { } as const; /** - * @internal + * @public */ export class Connection extends EventEmitter { _url: string; diff --git a/src/common/Page.ts b/src/common/Page.ts index 944b546d..aaede4de 100644 --- a/src/common/Page.ts +++ b/src/common/Page.ts @@ -840,7 +840,7 @@ export class Page extends EventEmitter { * @param enabled - Whether to enable drag interception. * * @remarks - * Activating drag interception enables the {@link Input.drag}, + * Activating drag interception enables the `Input.drag`, * methods This provides the capability to capture drag events emitted * on the page, which can then be used to simulate drag-and-drop. */ @@ -1407,32 +1407,33 @@ export class Page extends EventEmitter { /** * @returns Object containing metrics as key/value pairs. * - * - `Timestamp` : The timestamp when the metrics sample was taken. + * - `Timestamp` : The timestamp when the metrics sample was taken. * - * - `Documents` : Number of documents in the page. + * - `Documents` : Number of documents in the page. * - * - `Frames` : Number of frames in the page. + * - `Frames` : Number of frames in the page. * - * - `JSEventListeners` : Number of events in the page. + * - `JSEventListeners` : Number of events in the page. * - * - `Nodes` : Number of DOM nodes in the page. + * - `Nodes` : Number of DOM nodes in the page. * - * - `LayoutCount` : Total number of full or partial page layout. + * - `LayoutCount` : Total number of full or partial page layout. * - * - `RecalcStyleCount` : Total number of page style recalculations. + * - `RecalcStyleCount` : Total number of page style recalculations. * - * - `LayoutDuration` : Combined durations of all page layouts. + * - `LayoutDuration` : Combined durations of all page layouts. * - * - `RecalcStyleDuration` : Combined duration of all page style + * - `RecalcStyleDuration` : Combined duration of all page style * recalculations. * - * - `ScriptDuration` : Combined duration of JavaScript execution. + * - `ScriptDuration` : Combined duration of JavaScript execution. * - * - `TaskDuration` : Combined duration of all tasks performed by the browser. + * - `TaskDuration` : Combined duration of all tasks performed by the browser. * - * - `JSHeapUsedSize` : Used JavaScript heap size. * - * - `JSHeapTotalSize` : Total JavaScript heap size. + * - `JSHeapUsedSize` : Used JavaScript heap size. + * + * - `JSHeapTotalSize` : Total JavaScript heap size. * @remarks * NOTE: All timestamps are in monotonic time: monotonically increasing time * in seconds since an arbitrary point in the past. @@ -2430,33 +2431,33 @@ export class Page extends EventEmitter { * @remarks * Options object which might have the following properties: * - * - `path` : The file path to save the image to. The screenshot type + * - `path` : The file path to save the image to. The screenshot type * will be inferred from file extension. If `path` is a relative path, then * it is resolved relative to * {@link https://nodejs.org/api/process.html#process_process_cwd * | current working directory}. * If no path is provided, the image won't be saved to the disk. * - * - `type` : Specify screenshot type, can be either `jpeg` or `png`. + * - `type` : Specify screenshot type, can be either `jpeg` or `png`. * Defaults to 'png'. * - * - `quality` : The quality of the image, between 0-100. Not + * - `quality` : The quality of the image, between 0-100. Not * applicable to `png` images. * - * - `fullPage` : When true, takes a screenshot of the full + * - `fullPage` : When true, takes a screenshot of the full * scrollable page. Defaults to `false` * - * - `clip` : An object which specifies clipping region of the page. + * - `clip` : An object which specifies clipping region of the page. * Should have the following fields:
- * - `x` : x-coordinate of top-left corner of clip area.
- * - `y` : y-coordinate of top-left corner of clip area.
- * - `width` : width of clipping area.
- * - `height` : height of clipping area. + * - `x` : x-coordinate of top-left corner of clip area.
+ * - `y` : y-coordinate of top-left corner of clip area.
+ * - `width` : width of clipping area.
+ * - `height` : height of clipping area. * - * - `omitBackground` : Hides default white background and allows + * - `omitBackground` : Hides default white background and allows * capturing screenshots with transparency. Defaults to `false` * - * - `encoding` : The encoding of the image, can be either base64 or + * - `encoding` : The encoding of the image, can be either base64 or * binary. Defaults to `binary`. * *