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

Replace union member CSS with any to speed up type checking massively. #1

Open
wants to merge 9 commits into
base: canary
Choose a base branch
from
2 changes: 1 addition & 1 deletion packages/react/types/css-util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export type CSS<
[K: string]: (
| number
| string
| CSS<Media, Theme, ThemeMap, Utils>

Choose a reason for hiding this comment

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

Doesn't this mean that we lose type completion on nested css objects/properties?

Copy link
Author

Choose a reason for hiding this comment

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

Do you have an example where that would apply? I think line 30's member should handle most properties.

Copy link

@Pearce-Ropion Pearce-Ropion Oct 25, 2023

Choose a reason for hiding this comment

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

Im talking about the nested case. Line 30 handles properties at the top of the object. I think the line you are removing handles all the nested properties.

Screenshot 2023-10-25 at 1 10 04 PM

| {}
| undefined
| any
)
}
)
Expand Down