mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(module): mark functions used in exports as pure (#3604)
This commit is contained in:
@@ -8,6 +8,7 @@ interface DefineLocaleOptions<M> {
|
||||
messages: M
|
||||
}
|
||||
|
||||
/* @__NO_SIDE_EFFECTS__ */
|
||||
export function defineLocale<M>(options: DefineLocaleOptions<M>): Locale<M> {
|
||||
return defu<DefineLocaleOptions<M>, [{ dir: Direction }]>(options, { dir: 'ltr' })
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ export function extractShortcuts(items: any[] | any[][]) {
|
||||
return shortcuts
|
||||
}
|
||||
|
||||
/* @__NO_SIDE_EFFECTS__ */
|
||||
export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: ShortcutsOptions = {}) {
|
||||
const chainedInputs = ref<string[]>([])
|
||||
const clearChainedInput = () => {
|
||||
|
||||
@@ -67,4 +67,4 @@ const _useKbd = () => {
|
||||
}
|
||||
}
|
||||
|
||||
export const useKbd = createSharedComposable(_useKbd)
|
||||
export const useKbd = /* @__PURE__ */ createSharedComposable(_useKbd)
|
||||
|
||||
@@ -13,4 +13,4 @@ const _useLocale = (localeOverrides?: Ref<Locale<Messages> | undefined>) => {
|
||||
return buildLocaleContext<Messages>(computed(() => locale.value || en))
|
||||
}
|
||||
|
||||
export const useLocale = createSharedComposable(_useLocale)
|
||||
export const useLocale = /* @__PURE__ */ createSharedComposable(_useLocale)
|
||||
|
||||
@@ -116,4 +116,4 @@ function _useOverlay() {
|
||||
}
|
||||
}
|
||||
|
||||
export const useOverlay = createSharedComposable(_useOverlay)
|
||||
export const useOverlay = /* @__PURE__ */ createSharedComposable(_useOverlay)
|
||||
|
||||
@@ -4,4 +4,4 @@ import _appConfig from '#build/app.config'
|
||||
|
||||
const appConfigTv = _appConfig as AppConfig & { ui: { tv: typeof defaultConfig } }
|
||||
|
||||
export const tv = createTV(appConfigTv.ui?.tv)
|
||||
export const tv = /* @__PURE__ */ createTV(appConfigTv.ui?.tv)
|
||||
|
||||
Reference in New Issue
Block a user