Skip to content

Commit

Permalink
feat(unocss): default to theme type for defineConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 1, 2022
1 parent 8949894 commit e49981b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/unocss/src/index.ts
@@ -1,4 +1,5 @@
import type { UserConfig } from '@unocss/core'
import type { Theme as PresetUnoTheme } from '@unocss/preset-uno'

export * from '@unocss/core'
export { default as presetUno } from '@unocss/preset-uno'
Expand All @@ -13,6 +14,6 @@ export { default as transformerDirectives } from '@unocss/transformer-directives
export { default as transformerVariantGroup } from '@unocss/transformer-variant-group'
export { default as transformerCompileClass } from '@unocss/transformer-compile-class'

export function defineConfig<Theme extends {}>(config: UserConfig<Theme>) {
export function defineConfig<Theme extends {} = PresetUnoTheme>(config: UserConfig<Theme>) {
return config
}

0 comments on commit e49981b

Please sign in to comment.