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

Add ClassInterpolation to typings #676

Merged
merged 1 commit into from
May 26, 2018

Conversation

Ailrun
Copy link
Member

@Ailrun Ailrun commented May 26, 2018

What: Add ClassInterpolation to typings

Why: Original typings do not accept class interpolations, i.e., StyledComponent as interpolation.

How: Add ClassInterpolation with private properties.

Checklist:

  • [N/A] Documentation
  • Tests
  • Code complete

const StyledCompShorthandWithProps1 = createStyled.section<ShorthandProps>`
backgroundColor: ${props => getEditorLogoColor(props.editor)};
const StyledCompShorthandWithProps1 = createStyled.section`
backgroundColor: ${(props: ShorthandProps) => getEditorLogoColor(props.editor)};
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for this change?

Copy link
Member Author

@Ailrun Ailrun May 26, 2018

Choose a reason for hiding this comment

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

@mitchellhamilton Original one cannot pass checking in TS 2.3.
We should add yarn test:typescript to TravisCI...

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I removed the ts tests from travis because it was crashing and I didn't have time to figure out why, if you want to fix it and add it back here that would be great.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mitchellhamilton I will add it after this one will be merged.

@emmatown emmatown merged commit ab6cc81 into emotion-js:master May 26, 2018
@Ailrun Ailrun deleted the typing/fix-class-interpolations branch May 26, 2018 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants