-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 TS typings to create-emotion #663
Conversation
78ac40c
to
8abeff7
Compare
8abeff7
to
cdcb3fe
Compare
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.
Thanks!!!
css([]); | ||
css([1]); | ||
css([['abc', 'asdf'], 'efw']); | ||
|
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.
Could you add a test with the string syntax, for example:
css`
color: ${'hotpink'};
`
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 added them! Thank you for your feedback!
| FunctionInterpolation<C> | ||
; | ||
|
||
export type FunctionClassNameArg = () => ClassNameArg | void; |
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.
Could you remove this? We recently deprecated it in #643 so it would be nice to not have it in the typings.
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.
OK. I removed them.
} | ||
export interface CSSObject<C> extends CSSBaseObject, CSSPseudoObject<C>, CSSOthersObject<C> {} | ||
|
||
export type FunctionInterpolation<C> = (mergedProps: any, context: C) => Interpolation<C> | void; |
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.
Same as above. We recently deprecated it in #643 so it would be nice to not have it in the typings.
@mitchellhamilton Could I ask about release schedule? When will this be released? |
What: Add typings for create-emotion package
Why: To make TS user be able to use create-emotion package.
How: Using csstype package, who crawls css data from MDN.
Checklist:
I'm willing to add more strict typing (and the typing providing helpful autocompletions) for emotion package, but I think I should add typings for create-emotion, to avoid repeated code and revesed dependencies between typings.