Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed May 16, 2024
1 parent 752ccab commit 1eda622
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/ui/createSystem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Assign, Pretty } from '../types/utils.js'
import type { Assign } from '../types/utils.js'
import { Box } from './Box.js'
import { Column, Columns } from './Columns.js'
import { Divider } from './Divider.js'
Expand Down Expand Up @@ -32,17 +32,10 @@ import { type DefaultVars, type Vars, defaultVars } from './vars.js'
* })
* ```
*/
export function createSystem<const vars extends Vars = DefaultVars>(
export function createSystem<vars extends Vars = DefaultVars>(
vars?: vars | undefined,
) {
type Icons = unknown extends vars['icons']
? DefaultVars['icons']
: vars['icons']
type MergedVars = Pretty<
Omit<Assign<DefaultVars, vars>, 'icons'> & {
icons: Icons
}
>
type MergedVars = Assign<DefaultVars, vars>

const mergedVars = {
...defaultVars,
Expand Down

0 comments on commit 1eda622

Please sign in to comment.