diff --git a/src/lib/geo-location.ts b/src/lib/geo-location.ts index 49ff1878cb4..875925ec544 100644 --- a/src/lib/geo-location.ts +++ b/src/lib/geo-location.ts @@ -97,8 +97,7 @@ const getGeoLocationFromAPI = async (): Promise => { method: 'GET', signal: AbortSignal.timeout(REQUEST_TIMEOUT), }) - // @ts-expect-error TS(2339) - Property 'geo' does not exist on type 'unknown' - const { geo } = await res.json() + const { geo } = (await res.json()) as { geo: Geolocation } return geo } diff --git a/src/lib/string.ts b/src/lib/string.ts index 9504733a69c..13844dcb2c0 100644 --- a/src/lib/string.ts +++ b/src/lib/string.ts @@ -1,5 +1,3 @@ -// @ts-expect-error TS(7006) FIXME: Parameter 't' implicitly has an 'any' type. -export const capitalize = function (t) { - // @ts-expect-error TS(7006) FIXME: Parameter 'string' implicitly has an 'any' type. +export const capitalize = function (t: string) { return t.replace(/(^\w|\s\w)/g, (string) => string.toUpperCase()) }