From 90f0bb2ff856a499cc08b0096a170cb73596c081 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Sat, 12 Oct 2024 18:24:51 +0900 Subject: [PATCH] fix: broaden `renderMermaid` browser type Allow passing either a Puppeteer Browser or a Puppeteer BrowserContext to renderMermaid, as both work fine. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index abddef33..3b14e8a9 100644 --- a/src/index.js +++ b/src/index.js @@ -225,7 +225,7 @@ async function cli () { /** * Render a mermaid diagram. * - * @param {import("puppeteer").Browser} browser - Puppeteer Browser + * @param {import("puppeteer").Browser | import("puppeteer").BrowserContext} browser - Puppeteer Browser * @param {string} definition - Mermaid diagram definition * @param {"svg" | "png" | "pdf"} outputFormat - Mermaid output format. * @param {ParseMDDOptions} [opt] - Options, see {@link ParseMDDOptions} for details.