Skip to content
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

[typescript] Fix theme.spacing to accept up to 4 arguments #14539

Merged
merged 2 commits into from
Feb 15, 2019

Conversation

toshi1127
Copy link
Contributor

@toshi1127 toshi1127 commented Feb 15, 2019

Closes #14515

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format your code and add some test to packages/material-ui/styles/test/index.spec.tsx

@oliviertassinari oliviertassinari added typescript PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 15, 2019
@oliviertassinari oliviertassinari removed the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Feb 15, 2019
@oliviertassinari
Copy link
Member

@toshi1127 I have taken a shot at the problem, I still need to work on my TypeScript skills :).

@toshi1127
Copy link
Contributor Author

@oliviertassinari
Thank you very much. I understand that it is necessary to study considerably

@@ -1,4 +1,19 @@
export type Spacing = (value: number | string) => number | string;
/* tslint:disable:unified-signatures */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference: The reason for disabling this rule here is that tslint suggests using (value1: SpacingArgument, value2?: SpacingArgument). This would however accept spacing(1, undefined) which we do not want to accept.

@eps1lon eps1lon merged commit c653b6a into mui:next Feb 15, 2019
@eps1lon
Copy link
Member

eps1lon commented Feb 15, 2019

@toshi1127 and @oliviertassinari Thank you for working on this 😃

@eps1lon eps1lon changed the title [typescript] Fix theme.spacing to accept multiple arguments [typescript] Fix theme.spacing to accept up to 4 arguments Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants