UNPKG

html-minifier

Version:

Highly effective, super-configurable, well-tested web page minifier

36 lines • 1.13 kB
declare class Sorter { /** @type {Map<string, number>} */ rank: Map<string, number>; /** @type {Map<string, Sorter | (() => Sorter)>} */ sorterMap: Map<string, Sorter | (() => Sorter)>; constructor(); /** @param {string} token */ child(token: string): Sorter | undefined; /** * @param {string[]} tokens * @param {number} fromIndex * @returns {string[]} */ sort(tokens: string[], fromIndex?: number): string[]; } declare class TokenChain { /** @type {Map<string, {lists: Map<string, {tokens: string[], weight: number}>, count: number, processed: number}>} */ map: Map<string, { lists: Map<string, { tokens: string[]; weight: number; }>; count: number; processed: number; }>; constructor(); /** * @param {string[]} tokens * @param {number} [weight] */ add(tokens: string[], weight?: number): void; /** @param {Map<string, number>} [localeRanks] */ createSorter(localeRanks?: Map<string, number>): Sorter; } export default TokenChain; //# sourceMappingURL=tokenchain.d.ts.map