import { orCreateContext } from '../create-context' import { domToDataUrl } from './dom-to-data-url' import type { Context } from '../context' import type { Options } from '../options' export async function domToJpeg(node: T, options?: Options): Promise export async function domToJpeg(context: Context): Promise export async function domToJpeg(node: any, options?: any): Promise { return domToDataUrl( await orCreateContext(node, { ...options, type: 'image/jpeg' }), ) }