export type Search = ((prevSearch: Record) => Record) | Record; /** * Returns a new URL with updated search parameters. * @param url - The original URL string or URL object to update. * @param search - An object or a function that returns an object representing the search parameters to replace/update. * @returns A string representing the updated URL with the new search parameters. * @example * * // Replace search parameters using an object * const url1 = 'https://example.com/page?param1=value1¶m2=value2' * const updatedUrl1 = getUrlWithUpdatedSearch(url1, {param2: 'newValue2', param3: 'value3'}) * console.log(updatedUrl1) // 'https://example.com/page?param2=newValue2¶m3=value3' * * // Update search parameters using a function * const url2 = new URL('https://example.com/page?param1=value1¶m2=value2') * const updatedUrl2 = getUrlWithUpdatedSearch(url2, (prevSearch) => ({ * ...prevSearch, * param2: 'newValue2', * param3: 'value3', * })) * console.log(updatedUrl2) // 'https://example.com/page?param1=value1¶m2=newValue2¶m3=value3' */ export declare const getUrlWithUpdatedSearch: (url: string | URL, search: Search) => string; //# sourceMappingURL=getUrlWithUpdatedSearch.d.ts.map