resumefy
Version:
A simple toolkit to bring your JSON Resume to life
48 lines (47 loc) • 1.52 kB
TypeScript
import { type Page } from 'puppeteer';
import type { ResumeBrowser } from './ResumeBrowser.js';
/**
* Represents a page in the browser
*/
export declare class ResumePage {
page: Page;
browser: ResumeBrowser;
constructor(page: Page, browser: ResumeBrowser);
/**
* Get the content of the page
* @returns Promise resolving with the content of the page
*/
content(): Promise<string>;
/**
* Set the content of the page
* @param content Content to set
* @returns Promise resolving when content is set
*/
setContent(content: string): Promise<void>;
/**
* Write HTML file to the given directory
* @param dir Directory to write file to
* @param name Name of the file
* @returns Promise resolving when file is written
*/
html(dir: string, name: string): Promise<void>;
/**
* Write PDF file to the given directory
* @param dir Directory to write file to
* @param name Name of the file
* @returns Promise resolving when file is written
*/
pdf(dir: string, name: string): Promise<void | Uint8Array<ArrayBufferLike>>;
/**
* Go to a URL
* @param url URL to go to
* @returns Promise resolving when page is loaded
*/
goto(url: string): Promise<import("puppeteer").HTTPResponse | null>;
/**
* Add a menu to the page
* @param page page to add menu to
* @param openPreview callback to open preview
*/
addMenu(openPreview: () => void): Promise<void>;
}