diff --git a/static/app/views/issueDetails/groupDetails.tsx b/static/app/views/issueDetails/groupDetails.tsx index 8180463dce1906..9da21a6aca4d2c 100644 --- a/static/app/views/issueDetails/groupDetails.tsx +++ b/static/app/views/issueDetails/groupDetails.tsx @@ -581,8 +581,7 @@ const trackTabChanged = ({ const analyticsData = event ? event.tags .filter(({key}) => ['device', 'os', 'browser'].includes(key)) - .reduce((acc, {key, value}) => { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + .reduce>((acc, {key, value}) => { acc[key] = value; return acc; }, {}) diff --git a/static/app/views/issueDetails/groupSimilarIssues/similarStackTrace/item.tsx b/static/app/views/issueDetails/groupSimilarIssues/similarStackTrace/item.tsx index ec2913e159d25f..440d646320b81c 100644 --- a/static/app/views/issueDetails/groupSimilarIssues/similarStackTrace/item.tsx +++ b/static/app/views/issueDetails/groupSimilarIssues/similarStackTrace/item.tsx @@ -96,8 +96,7 @@ class Item extends Component { } Object.keys(stateForId).forEach(key => { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - if (stateForId[key] === this.state[key]) { + if (stateForId[key] === this.state[key as keyof State]) { return; } this.setState(prevState => ({ @@ -111,9 +110,8 @@ class Item extends Component { const {aggregate, scoresByInterface, issue, hasSimilarityEmbeddingsFeature} = this.props; const {visible, busy} = this.state; - const similarInterfaces = hasSimilarityEmbeddingsFeature - ? ['exception'] - : ['exception', 'message']; + const similarInterfaces: Array<'exception' | 'message'> = + hasSimilarityEmbeddingsFeature ? ['exception'] : ['exception', 'message']; if (!visible) { return null; @@ -152,9 +150,7 @@ class Item extends Component { {similarInterfaces.map(interfaceName => { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message const avgScore = aggregate?.[interfaceName]; - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message const scoreList = scoresByInterface?.[interfaceName] || []; // Check for valid number (and not NaN) diff --git a/static/app/views/issueDetails/groupTags/groupTagsDrawer.tsx b/static/app/views/issueDetails/groupTags/groupTagsDrawer.tsx index 75fba09f49b3f6..f879eebd12c740 100644 --- a/static/app/views/issueDetails/groupTags/groupTagsDrawer.tsx +++ b/static/app/views/issueDetails/groupTags/groupTagsDrawer.tsx @@ -79,8 +79,7 @@ export function GroupTagsDrawer({group}: {group: Group}) { const tagValues = useMemo( () => - data.reduce((valueMap, tag) => { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message + data.reduce>((valueMap, tag) => { valueMap[tag.key] = tag.topValues.map(tv => tv.value).join(' '); return valueMap; }, {}), @@ -99,8 +98,7 @@ export function GroupTagsDrawer({group}: {group: Group}) { tag => tag.key.includes(search) || tag.name.includes(search) || - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - tagValues[tag.key].includes(search) + tagValues[tag.key]?.includes(search) ); return searchedTags; }, [data, search, tagValues, highlightTagKeys]); diff --git a/static/app/views/issueDetails/streamline/eventGraph.tsx b/static/app/views/issueDetails/streamline/eventGraph.tsx index 09e03701c2738a..69674dcb070fc4 100644 --- a/static/app/views/issueDetails/streamline/eventGraph.tsx +++ b/static/app/views/issueDetails/streamline/eventGraph.tsx @@ -111,7 +111,7 @@ export function EventGraph({group, event, ...styleProps}: EventGraphProps) { }); const {data: uniqueUsersCount, isPending: isPendingUniqueUsersCount} = useApiQuery<{ - data: Array<{count_unique: number}>; + data: Array<{'count_unique(user)': number}>; }>( [ `/organizations/${organization.slug}/events/`, @@ -133,7 +133,6 @@ export function EventGraph({group, event, ...styleProps}: EventGraphProps) { staleTime: 60_000, } ); - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message const userCount = uniqueUsersCount?.data[0]?.['count_unique(user)'] ?? 0; const {series: eventSeries, count: eventCount} = useMemo(() => { diff --git a/static/app/views/issueDetails/streamline/eventNavigation.tsx b/static/app/views/issueDetails/streamline/eventNavigation.tsx index adc51e1d5fad91..0ae3792a063fc0 100644 --- a/static/app/views/issueDetails/streamline/eventNavigation.tsx +++ b/static/app/views/issueDetails/streamline/eventNavigation.tsx @@ -93,8 +93,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps) onAction={key => { trackAnalytics('issue_details.issue_content_selected', { organization, - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - content: TabName[key], + content: TabName[key as keyof typeof TabName]!, }); }} items={[ diff --git a/static/app/views/issueDetails/streamline/sidebar/resources.tsx b/static/app/views/issueDetails/streamline/sidebar/resources.tsx index d812fd62583617..8c718bfff0cced 100644 --- a/static/app/views/issueDetails/streamline/sidebar/resources.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/resources.tsx @@ -18,8 +18,9 @@ export default function Resources({configResources, eventPlatform, group}: Props const organization = useOrganization(); const links: ResourceLink[] = [ ...configResources.links, - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - ...(configResources.linksByPlatform[eventPlatform ?? ''] ?? []), + ...(configResources.linksByPlatform[ + (eventPlatform ?? '') as keyof typeof configResources.linksByPlatform + ] ?? []), ]; return ( diff --git a/static/app/views/issueDetails/traceTimeline/useTraceTimelineEvents.tsx b/static/app/views/issueDetails/traceTimeline/useTraceTimelineEvents.tsx index a15159928eecac..f9661a92303f5d 100644 --- a/static/app/views/issueDetails/traceTimeline/useTraceTimelineEvents.tsx +++ b/static/app/views/issueDetails/traceTimeline/useTraceTimelineEvents.tsx @@ -158,15 +158,15 @@ export function useTraceTimelineEvents({event}: UseTraceTimelineEventsOptions): culprit: event.culprit, id: event.id, 'issue.id': Number(event.groupID), - message: event.message, project: event.projectID, // The project name for current event is not used 'project.name': '', timestamp: event.dateCreated!, title: event.title, transaction: '', - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - 'event.type': event['event.type'], + 'event.type': event.type === 'default' ? 'default' : 'error', + 'error.value': [event.message], + 'stack.function': [], }); } const timestamps = events.map(e => new Date(e.timestamp).getTime()); diff --git a/static/app/views/issueDetails/utils.tsx b/static/app/views/issueDetails/utils.tsx index 58c350194d1190..59c5c057cceb62 100644 --- a/static/app/views/issueDetails/utils.tsx +++ b/static/app/views/issueDetails/utils.tsx @@ -134,8 +134,7 @@ export function getSubscriptionReason(group: Group) { } if (reason && SUBSCRIPTION_REASONS.hasOwnProperty(reason)) { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message - return SUBSCRIPTION_REASONS[reason]; + return SUBSCRIPTION_REASONS[reason as keyof typeof SUBSCRIPTION_REASONS]; } }