Skip to content

Commit

Permalink
add the missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
hadihallak committed Aug 12, 2021
1 parent 435459e commit fc1b4a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions packages/react/types/css-util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export type CSS<
Media = {},
Theme = {},
ThemeMap = Config.DefaultThemeMap,
Utils = {}
Utils = {},
IsFlat = false
> = (
// nested at-rule css styles
& {
Expand Down Expand Up @@ -97,7 +98,7 @@ export type CSS<
)
}
// unknown css declaration styles
& {
& (true extends IsFlat ? {} : {
/** Unknown property. */
[K in string]: (
| number
Expand All @@ -106,7 +107,7 @@ export type CSS<
| {}
| undefined
)
}
})
)

/** Unique symbol used to reference a property value. */
Expand Down
3 changes: 2 additions & 1 deletion packages/react/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export type CSS<
Config['media'],
Config['theme'],
Config['themeMap'],
Config['utils']
Config['utils'],
false
>

/** Returns the properties, attributes, and children expected by a component. */
Expand Down
4 changes: 2 additions & 2 deletions packages/react/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default interface Stitches<
? Composers[K]
: Composers[K] extends Util.Function
? Composers[K]
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> & {
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils, true> & {
/** The **variants** property sets variants.
*
* [Read Documentation](https://stitches.dev/docs/variants)
Expand Down Expand Up @@ -194,7 +194,7 @@ export default interface Stitches<
? Composers[K]
: Composers[K] extends Util.Function
? Composers[K]
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils> & {
: CSSUtil.CSS<Media, Theme, ThemeMap, Utils, true> & {
/** The **variants** property sets variants.
*
* [Read Documentation](https://stitches.dev/docs/variants)
Expand Down

0 comments on commit fc1b4a1

Please sign in to comment.