From a8d6417fb2e438dbf778d9b5499f91dd214602f1 Mon Sep 17 00:00:00 2001 From: k-tecchan Date: Sun, 4 Aug 2024 02:17:40 +0000 Subject: [PATCH] refactor: getQueryParam signature --- src/utils/url.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/utils/url.ts b/src/utils/url.ts index 47db1c69..91de01de 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -290,13 +290,12 @@ const _getQueryParam = ( return key ? results[key] : results } -export const getQueryParam: ( +export const getQueryParam = ( url: string, key?: string -) => string | undefined | Record = _getQueryParam as ( - url: string, - key?: string -) => string | undefined | Record +): string | undefined | Record => { + return _getQueryParam(url, key) as string | undefined | Record +} export const getQueryParams = ( url: string,