diff --git a/packages/core/types/stitches.d.ts b/packages/core/types/stitches.d.ts index 233dc2d5..42a72008 100644 --- a/packages/core/types/stitches.d.ts +++ b/packages/core/types/stitches.d.ts @@ -110,7 +110,7 @@ export default interface Stitches< ) } theme: - string + string & { className: string selector: string @@ -143,7 +143,9 @@ export default interface Stitches< ...composers: { [K in keyof Composers]: ( // Strings and Functions can be skipped over - Composers[K] extends string | Util.Function + string extends Composers[K] + ? Composers[K] + : Composers[K] extends string | Util.Function ? Composers[K] : RemoveIndex & { /** The **variants** property lets you set a subclass of styles based on a key-value pair. diff --git a/packages/react/types/stitches.d.ts b/packages/react/types/stitches.d.ts index b44711b2..846f281a 100644 --- a/packages/react/types/stitches.d.ts +++ b/packages/react/types/stitches.d.ts @@ -110,7 +110,7 @@ export default interface Stitches< ) } theme: - string + string & { className: string selector: string @@ -145,7 +145,9 @@ export default interface Stitches< ...composers: { [K in keyof Composers]: ( // Strings, React Components, and Functions can be skipped over - Composers[K] extends string | React.ExoticComponent | React.JSXElementConstructor | Util.Function + string extends Composers[K] + ? Composers[K] + : Composers[K] extends string | React.ExoticComponent | React.JSXElementConstructor | Util.Function ? Composers[K] : RemoveIndex & { /** The **variants** property lets you set a subclass of styles based on a key-value pair. @@ -208,14 +210,16 @@ export default interface Stitches< | React.ComponentType | Util.Function | { [name: string]: unknown } - )[], + )[], CSS = CSSUtil.CSS >( type: Type, ...composers: { [K in keyof Composers]: ( // Strings, React Components, and Functions can be skipped over - Composers[K] extends string | React.ComponentType | Util.Function + string extends Composers[K] + ? Composers[K] + : Composers[K] extends string | React.ComponentType | Util.Function ? Composers[K] : RemoveIndex & { /** The **variants** property lets you set a subclass of styles based on a key-value pair.