Skip to content

Commit

Permalink
Add a jsdoc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Sep 26, 2023
1 parent a300c3b commit 6ed35d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface UserThemes {}
/** @internal */
export type _UserTheme = UserThemes[keyof UserThemes]

/** @internal */
export type _ThemeWithoutArrayScales = {
/** Theme without array scales, so it's easier to read from inside of .sx prop */
export type WidenedTheme = {
[P in keyof ThemeUITheme]: ThemeUITheme[P] extends Scale<infer R> | undefined
? ScaleDict<R>
: ThemeUITheme[P]
Expand All @@ -23,9 +23,7 @@ export type Theme<TTheme = {}> = _UserTheme extends never
: _UserTheme

/** @internal */
export type _JSXTheme = _UserTheme extends never
? _ThemeWithoutArrayScales
: _UserTheme
export type _JSXTheme = _UserTheme extends never ? WidenedTheme : _UserTheme

export interface SxProp {
/**
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ed35d9

Please sign in to comment.