/* eslint-disable eslint-comments/no-unlimited-disable */ /* eslint-disable */ // @ts-nocheck import type { FormatLongFn, FormatLongWidth } from '../../types.ts'; export interface BuildFormatLongFnArgs { formats: Partial<{ [format in FormatLongWidth]: string }> & { [format in DefaultMatchWidth]: string; }; defaultWidth: DefaultMatchWidth; } export function buildFormatLongFn( args: BuildFormatLongFnArgs, ): FormatLongFn { return (options = {}) => { // TODO: Remove String() const width = options.width ? (String(options.width) as FormatLongWidth) : args.defaultWidth; const format = args.formats[width] || args.formats[args.defaultWidth]; return format; }; } /* eslint-enable */