weareinreach / InReach

Found explicit type declarations JS-0331
Anti-pattern
Major
2 occurrences in this check
Type string trivially inferred from a string literal, remove type annotation
 7type ArrayElementOrSelf<T> = T extends Array<infer U> ? U[] : T[]
 8
 9export const getServerSideTranslations = async (
10	locale: string = 'en',11	namespacesRequired?: ArrayElementOrSelf<Namespace> | undefined,
12	extraLocales?: string[] | false
13) => await serverSideTranslations(locale, namespacesRequired, i18nextConfig, extraLocales)
Type number trivially inferred from a number literal, remove type annotation
1/** Number of search results per page */
2export const SEARCH_RESULT_PAGE_SIZE = 10
3export const getSearchResultPageCount = (results: number = 0) => Math.ceil(results / SEARCH_RESULT_PAGE_SIZE)