weareinreach / InReach

Found explicit type declarations JS-0331
Anti-pattern
Major
7 days agoa year old
Type boolean trivially inferred from a boolean literal, remove type annotation
  5
  6import type CrowdinApi from '@crowdin/crowdin-api-client'
  7
  8const getProjectId = (isDatabaseString: boolean = false) =>  9	isDatabaseString ? projectId.dbContent : projectId.base
 10
 11export const createCommonFns = (client: CrowdinApi) => {
Type boolean trivially inferred from a boolean literal, remove type annotation
 6	record: AttributeRecord,
 7	t: TFunction,
 8	locale: string,
 9	isEditMode: boolean = false10): SrvFocusAttribReturn => {
11	const lng = locale
12	const { tsKey, icon, tsNs, supplementId: id, active } = record
Type string trivially inferred from a string literal, remove type annotation
 16
 17const AccessLink = ({ link, domainOnly, ...props }: AccessLinkProps) => {
 18	if (!isExternal(link)) return null
 19	let displayText: string = '' 20	const protocolStrip = /^https?:\/\//i
 21	// eslint-disable-next-line no-useless-escape
 22	const domainExtract = /https?:\/\/([^:\/\n?]+)/