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

ThemeType function conversion #8883

Open
sync-by-unito bot opened this issue Mar 5, 2024 · 1 comment
Open

ThemeType function conversion #8883

sync-by-unito bot opened this issue Mar 5, 2024 · 1 comment

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Mar 5, 2024

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.

┆Issue is synchronized with this Asana task by Unito

Copy link
Author

sync-by-unito bot commented Mar 5, 2024

➤ JP Addison commented:

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"?

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

No branches or pull requests

0 participants