chore(useUI): improve type

This commit is contained in:
Benjamin Canac
2023-11-28 16:38:00 +01:00
parent 29efa99fb7
commit 2dcc11ff89

View File

@@ -4,7 +4,7 @@ import { useAppConfig } from '#imports'
import { mergeConfig, omit, get } from '../utils'
import type { Strategy } from '../types'
export const useUI = <T>(key, $ui?: Ref<Partial<T & { strategy: Strategy }>>, $config?: Ref<T> | T, $wrapperClass?: Ref<string>, withAppConfig: boolean = false) => {
export const useUI = <T>(key, $ui?: Ref<Partial<T & { strategy?: Strategy }> | undefined>, $config?: Ref<T> | T, $wrapperClass?: Ref<string>, withAppConfig: boolean = false) => {
const $attrs = useAttrs()
const appConfig = useAppConfig()