export type Task = () => Promise; export type MinimizedResult = import("./index.js").MinimizedResult; export type CustomOptions = import("./index.js").CustomOptions; export type Input = import("./index.js").Input; export type HtmlMinifierTerserOptions = import("html-minifier-terser").Options; /** * @template T * @typedef {() => Promise} Task */ /** * Run tasks with limited concurrency. * @template T * @param {number} limit - Limit of tasks that run at once. * @param {Task[]} tasks - List of tasks to run. * @returns {Promise} A promise that fulfills to an array of the results */ export function throttleAll(limit: number, tasks: Task[]): Promise; /** * @template T * @param fn {(function(): any) | undefined} * @returns {function(): T} */ export function memoize(fn: (() => any) | undefined): () => T; /** * @param {Input} input * @param {CustomOptions | undefined} [minimizerOptions] * @returns {Promise} */ export function htmlMinifierTerser( input: Input, minimizerOptions?: CustomOptions | undefined, ): Promise; /** * @param {Input} input * @param {CustomOptions | undefined} [minimizerOptions] * @returns {Promise} */ export function swcMinify( input: Input, minimizerOptions?: CustomOptions | undefined, ): Promise; /** * @param {Input} input * @param {CustomOptions | undefined} [minimizerOptions] * @returns {Promise} */ export function swcMinifyFragment( input: Input, minimizerOptions?: CustomOptions | undefined, ): Promise; /** * @param {Input} input * @param {CustomOptions | undefined} [minimizerOptions] * @returns {Promise} */ export function minifyHtmlNode( input: Input, minimizerOptions?: CustomOptions | undefined, ): Promise;