You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To take advantage of strongly-typed class names, all ClassesType component arguments should become ClassesType<typeof styles>, and to make this work all styles functions should infer their own return type instead of manually declaring a JssStyles return type, (so const styles = (theme: ThemeType): JssStyles => ({ should become const styles = (theme: ThemeType) => ({). Once all components have been converted we should remove the default gereric argument for ClassesType to ensure all future components take advatage of the strong typing.
Ollie Etherington I realized I'm not actually sure how theme functions should be typed, and couldn't immediately find the answer. Could you edit this ticket to have the right description and title for "properly type all the style functions"?
To take advantage of strongly-typed class names, all
ClassesType
component arguments should becomeClassesType<typeof styles>
, and to make this work allstyles
functions should infer their own return type instead of manually declaring aJssStyles
return type, (soconst styles = (theme: ThemeType): JssStyles => ({
should becomeconst styles = (theme: ThemeType) => ({
). Once all components have been converted we should remove the default gereric argument forClassesType
to ensure all future components take advatage of the strong typing.┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: