Skip to content

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

Closed
wants to merge 6 commits into from
Closed

chore(ui): Upgrade to typescript 4 #20702

wants to merge 6 commits into from

Conversation

scttcper
Copy link
Member

@scttcper scttcper commented Sep 10, 2020

depends on #20703 & #20701

@vercel
Copy link

vercel bot commented Sep 10, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

@github-actions
Copy link
Contributor

size-limit report

Path Size
public/app.js 230.85 KB (0%)
public/vendor.js 444.51 KB (0%)

@scttcper scttcper requested review from a team and removed request for a team September 10, 2020 03:25
Copy link
Member

@priscilawebdev priscilawebdev left a 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'>>`
Copy link
Member

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'>) => {

@@ -127,7 +127,7 @@ class EventDetailsContent extends AsyncComponent<Props, State> {
}
const eventReference = {...event};
if (eventReference.id) {
delete eventReference.id;
delete (eventReference as any).id;
Copy link
Member

@priscilawebdev priscilawebdev Sep 10, 2020

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.

@scttcper scttcper closed this Sep 10, 2020
@scttcper
Copy link
Member Author

@priscilawebdev @dashed I'll take a look at the feedback in #20703 - sorry for the confusion. Wanted to run CI and accidentally tagged frontend.

@scttcper scttcper deleted the scttcper/ts4 branch September 14, 2020 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants