/** * @file extToValue * @module pathe/lib/extToValue */ import type { EmptyString, Ext } from '@flex-development/pathe'; /** * Get a value for `input` based on its file extension. * * This algorithm picks the value with the longest matching file extension, * so if `map` has the keys `'.mts'` and `'.d.mts'`, the value for `'.d.mts'` * will be returned. * * @see {@linkcode EmptyString} * @see {@linkcode Ext} * * @category * utils * * @template {any} T * Map value * * @this {void} * * @param {URL | string} input * The {@linkcode URL}, URL string, or path to handle * @param {Partial>} map * Extension map * @return {T | undefined} * Value based on file extension of `input` */ declare function extToValue(this: void, input: URL | string, map: Partial>): T | undefined; export default extToValue;