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

Low precision TypeScript error in SystemStyleObject #764

Closed
hasparus opened this issue Mar 16, 2020 · 3 comments
Closed

Low precision TypeScript error in SystemStyleObject #764

hasparus opened this issue Mar 16, 2020 · 3 comments

Comments

@hasparus
Copy link
Member

Describe the bug

The error for incorrect SystemStyleObject is wonky.
This will need some work on typings. Not sure how to fix it yet.

I'll work on it next weekend if nobody picks this up faster.

To be clear, I am not reporting that size is missing. This is an easy problem to fix.
My beef is with this error message, which deems entire object to be incorrect, while it's not.

To Reproduce
Steps to reproduce the behavior:

  1. size property is not is not supported (in typings)
  2. We add size.
  3. Entire object becomes burning red.

Expected behavior
Expected: The error is local to the size property.

Screenshots
theme-ui

Notes
SystemStyleObject name is inherited from styled-system. Should it be renamed to something more user-friendly before next release?

@hasparus hasparus changed the title Low precision TypeScript error in SystemStyleObject. Low precision TypeScript error in SystemStyleObject Mar 16, 2020
@jxnblk
Copy link
Member

jxnblk commented Mar 16, 2020

I don't know if I have any insight for the core issue here, but would it make sense to name the type SxStyle? If there are still any dependencies on the styled-system library, we should move away from that as well, since the library is not written in TypeScript

@hasparus
Copy link
Member Author

I fixed the missing size thing in #765.

@hasparus
Copy link
Member Author

Thanks for the issue @hasparus.
I think @hasparus has already fixed this problem in #1002. You can read more about it in #1002 (comment).

Let's close.

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

2 participants