Skip to content

Commit

Permalink
Add maxLength parameter to `filterURLForDisplay'
Browse files Browse the repository at this point in the history
@wordpress/url: Add a maxLength argument to filterURLForDisplay. (27530)

WordPress/gutenberg#27530
  • Loading branch information
lipemat committed Jan 7, 2021
1 parent 3b56612 commit a362045
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wordpress__url/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ declare module '@wordpress/url' {
* Returns a URL for display.
*
* @param {string} url Original URL.
* @param {string|null} maxLength URL length.
*
* @example
* ```js
Expand All @@ -255,7 +256,7 @@ declare module '@wordpress/url' {
*
* @return {string} Displayed URL.
*/
export function filterURLForDisplay( url: string ): string;
export function filterURLForDisplay( url: string, maxLength?: string | null ): string;

/**
* Performs some basic cleanup of a string for use as a post slug.
Expand Down

0 comments on commit a362045

Please sign in to comment.