Skip to content

Commit 2ad71d4

Browse files
committed
simplify JS Doc
1 parent 5fa9998 commit 2ad71d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ import { Encoding, ScreenshotType, Options, ScreenshotParams, Content, Condition
88
* Generates an image (or images) from HTML using Puppeteer, optionally supporting batch processing.
99
*
1010
* @template TE - The encoding type mapped by 'encoding' parameter. Base64 or binary. Default: binary (undefined).
11-
* @template TC - The content type mapped by 'content' parameter. Object (ContentObject) or Object Array (ContentArrayItem[]).
11+
* @template TC - The content type mapped by 'content' parameter. This is either an object or object[].
1212
* @param options - Configuration options for HTML rendering and screenshot generation.
1313
* @param options.html - The HTML string to render.
1414
* @param options.encoding - The encoding for the output image(s).
1515
* @param options.transparent - Whether the background should be transparent.
1616
* @param options.content - Content data or array of content data for batch processing.
17-
* @param options.output - Output file path if content is an Object. Else define output within the Content Array ContentArrayItem[].
18-
* @param options.selector - CSS selector to target a specific element for screenshot if content is an Object. Else selector within the Content Array ContentArrayItem[].
17+
* @param options.output - Output file path if content is an object. Else define output within the Content object[].
18+
* @param options.selector - CSS selector to target a specific element for the screenshot if content is an object. Else declare the selector within the Content object[].
1919
* @param options.type - The image format. Options: 'png' (default), 'jpeg'
2020
* @param options.quality - The image quality (for JPEG).
2121
* @param options.puppeteerArgs - Puppeteer configuration options.
2222
* @param options.timeout - Timeout for Puppeteer operations in MS (default: 30000ms/30s).
2323
* @param options.puppeteer - Use a custom puppeteer library (i.e puppeteer-core or puppeteer-extra)
24-
* @returns String or Buffer depending on encoding type. If content is an array it will return an Array instead of single a string or Buffer.
24+
* @returns String (base64) or Buffer (binary) depending on encoding type. If content is an array it will return an array instead of single a string or Buffer.
2525
*/
2626
export async function nodeHtmlToImage<TE extends Encoding | undefined = undefined, TC extends Content | undefined = undefined>(options: Options<TE, TC>): Promise<ConditionalArray<TC, ScreenshotType<TE>, ScreenshotType<TE>>> {
2727
const {

0 commit comments

Comments
 (0)