Miao-Yunzai/renderers/puppeteer/index.ts

18 lines
544 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { PuppeteerLaunchOptions } from 'puppeteer';
import Puppeteer from './lib/puppeteer.js'
/**
*
* @param config
* @returns renderer 渲染器对象
* @returns renderer.id 渲染器ID对应renderer中选择的id
* @returns renderer.type 渲染类型保留字段暂时支持image
* @returns renderer.render 渲染入口
*/
export default function (config?: PuppeteerLaunchOptions & {
chromiumPath: string;
puppeteerWS: any;
puppeteerTimeout: any;
}) {
// TODO Puppeteer待简化重构
return new Puppeteer(config)
}