Skip to content

Commit

Permalink
fix: return type for createTheme
Browse files Browse the repository at this point in the history
fixes: #713 again
  • Loading branch information
jake-nz committed Aug 30, 2021
1 parent 966f860 commit 632999c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/core/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ export default interface Stitches<
selector: string
}
& (
Argument0 extends {}
? ThemeTokens<Argument0, Prefix>
: Argument1 extends {}
Argument0 extends string
? ThemeTokens<Argument1, Prefix>
: {}
: ThemeTokens<Argument0, Prefix>
)
}
theme: string & {
Expand Down
6 changes: 2 additions & 4 deletions packages/react/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ export default interface Stitches<
selector: string
}
& (
Argument0 extends {}
? ThemeTokens<Argument0, Prefix>
: Argument1 extends {}
Argument0 extends string
? ThemeTokens<Argument1, Prefix>
: {}
: ThemeTokens<Argument0, Prefix>
)
}
theme: string & {
Expand Down

0 comments on commit 632999c

Please sign in to comment.