From a3620455cf014bd4f1c087466d1a9b2a3fba6932 Mon Sep 17 00:00:00 2001 From: lipemat Date: Thu, 7 Jan 2021 08:38:42 -0700 Subject: [PATCH] Add `maxLength` parameter to `filterURLForDisplay' @wordpress/url: Add a maxLength argument to filterURLForDisplay. (27530) https://github.com/WordPress/gutenberg/pull/27530 --- wordpress__url/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wordpress__url/index.d.ts b/wordpress__url/index.d.ts index 07b4351..4aa394a 100644 --- a/wordpress__url/index.d.ts +++ b/wordpress__url/index.d.ts @@ -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 @@ -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.