import * as Handlers from '../handlers/handlers.js'; export declare function normalizeSource(source: string): string; /** * The key is a source map `sources` entry (these are URLs/file paths), but normalized * via `normalizeSource`. * * The value is an object with an entry for every script that has a source map which * denotes that this source was used, along with the estimated resource size it takes * up in the script. */ export type ScriptDuplication = Map; }>; /** * Sorts each array within @see ScriptDuplication by attributedSize, drops information * on sources that are too small, and calculates esimatedDuplicateBytes. */ export declare function normalizeDuplication(duplication: ScriptDuplication): void; export declare function getNodeModuleName(source: string): string; /** * Returns 2 @see ScriptDuplication for the given collection of script contents + source maps: * * 1. `duplication` keys correspond to authored files * 2. `duplication` keys correspond to authored files, except all files within the same * node_module package are aggregated under the same entry. */ export declare function computeScriptDuplication(scriptsData: Handlers.ModelHandlers.Scripts.ScriptsData, compressionRatios: Map): { duplication: ScriptDuplication; duplicationGroupedByNodeModules: ScriptDuplication; };