-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(ui): Upgrade to typescript 4 #20702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request is being automatically deployed with Vercel (learn more). |
size-limit report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!!! I am looking forward to this 👏
@@ -358,7 +358,7 @@ const getIconMargin = ({size, hasChildren}: IconProps) => { | |||
return size && size.endsWith('small') ? '6px' : '8px'; | |||
}; | |||
|
|||
const Icon = styled('span')<IconProps>` | |||
const Icon = styled('span')<IconProps & Omit<StyledButtonProps, 'theme'>>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't do that because the IconProps type already has everything that is needed. To fix the type issue, I would prefer to update the getFontSize method. As below:
const getFontSize = ({size, theme}: Pick<StyledButtonProps, 'size' | 'theme'>) => {
src/sentry/static/sentry/app/components/events/interfaces/spans/spanDetail.tsx
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/spanDetail.tsx
Show resolved
Hide resolved
@@ -127,7 +127,7 @@ class EventDetailsContent extends AsyncComponent<Props, State> { | |||
} | |||
const eventReference = {...event}; | |||
if (eventReference.id) { | |||
delete eventReference.id; | |||
delete (eventReference as any).id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventReference
should be of type Event. I think the dev did this const eventReference = {...event};
because he/she/they didn't want to mutate the event
state.
src/sentry/static/sentry/app/views/settings/projectAlerts/issueEditor/index.tsx
Show resolved
Hide resolved
@priscilawebdev @dashed I'll take a look at the feedback in #20703 - sorry for the confusion. Wanted to run CI and accidentally tagged frontend. |
depends on #20703 & #20701