Skip to content

Commit

Permalink
Fix issue with default theme typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Sep 23, 2021
1 parent 844c9a0 commit 3c9d2e0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
24 changes: 15 additions & 9 deletions packages/core/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,22 @@ export default interface Stitches<
: ThemeTokens<Argument0, Prefix>
)
}
theme: string & {
[Scale in keyof Theme]: {
[Token in keyof Theme[Scale]]: ThemeUtil.Token<
Extract<Token, string | number>,
string,
Extract<Scale, string | void>,
Extract<Prefix, string | void>
>
theme:
string
& {
className: string
selector: string
}
& {
[Scale in keyof Theme]: {
[Token in keyof Theme[Scale]]: ThemeUtil.Token<
Extract<Token, string | number>,
string,
Extract<Scale, string | void>,
Extract<Prefix, string | void>
>
}
}
}
reset: {
(): void
}
Expand Down
24 changes: 15 additions & 9 deletions packages/react/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,22 @@ export default interface Stitches<
: ThemeTokens<Argument0, Prefix>
)
}
theme: string & {
[Scale in keyof Theme]: {
[Token in keyof Theme[Scale]]: ThemeUtil.Token<
Extract<Token, string | number>,
string,
Extract<Scale, string | void>,
Extract<Prefix, string | void>
>
theme:
string
& {
className: string
selector: string
}
& {
[Scale in keyof Theme]: {
[Token in keyof Theme[Scale]]: ThemeUtil.Token<
Extract<Token, string | number>,
string,
Extract<Scale, string | void>,
Extract<Prefix, string | void>
>
}
}
}
reset: {
(): void
}
Expand Down

0 comments on commit 3c9d2e0

Please sign in to comment.