UNPKG

tea-school

Version:

A simplified html + css --> PDF generator

20 lines (19 loc) 763 B
/// <reference types="node" /> import * as pug from 'pug'; import { LaunchOptions, PDFOptions } from 'puppeteer'; import { Options as SassOptions } from 'node-sass'; declare namespace TeaSchool { interface GeneratePdfOptions { styleOptions?: SassOptions; htmlTemplateFn?: pug.compileTemplate; htmlTemplatePath?: string; htmlTemplateOptions?: pug.Options & pug.LocalsObject; pdfOptions?: PDFOptions; puppeteerOptions?: LaunchOptions; } const generatePdf: (options: GeneratePdfOptions) => Promise<Buffer>; } export declare const generatePdf: (options: TeaSchool.GeneratePdfOptions) => Promise<Buffer>; export interface GeneratePdfOptions extends TeaSchool.GeneratePdfOptions { } export default TeaSchool;