From 632999c4f0f19b6d5bbae128089afb96b87bc922 Mon Sep 17 00:00:00 2001 From: Jake Crosby Date: Mon, 30 Aug 2021 13:23:32 +1000 Subject: [PATCH] fix: return type for createTheme fixes: #713 again --- packages/core/types/stitches.d.ts | 6 ++---- packages/react/types/stitches.d.ts | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/core/types/stitches.d.ts b/packages/core/types/stitches.d.ts index d9c1bb20..e20cd1c2 100644 --- a/packages/core/types/stitches.d.ts +++ b/packages/core/types/stitches.d.ts @@ -98,11 +98,9 @@ export default interface Stitches< selector: string } & ( - Argument0 extends {} - ? ThemeTokens - : Argument1 extends {} + Argument0 extends string ? ThemeTokens - : {} + : ThemeTokens ) } theme: string & { diff --git a/packages/react/types/stitches.d.ts b/packages/react/types/stitches.d.ts index 99dbf4ed..fec34410 100644 --- a/packages/react/types/stitches.d.ts +++ b/packages/react/types/stitches.d.ts @@ -98,11 +98,9 @@ export default interface Stitches< selector: string } & ( - Argument0 extends {} - ? ThemeTokens - : Argument1 extends {} + Argument0 extends string ? ThemeTokens - : {} + : ThemeTokens ) } theme: string & {