Skip to content

Commit 57efc78

Browse files
authoredMar 18, 2025··
fix(module): mark functions used in exports as pure (#3604)
1 parent dec2730 commit 57efc78

File tree

6 files changed

+6
-4
lines changed

6 files changed

+6
-4
lines changed
 

‎src/runtime/composables/defineLocale.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface DefineLocaleOptions<M> {
88
messages: M
99
}
1010

11+
/* @__NO_SIDE_EFFECTS__ */
1112
export function defineLocale<M>(options: DefineLocaleOptions<M>): Locale<M> {
1213
return defu<DefineLocaleOptions<M>, [{ dir: Direction }]>(options, { dir: 'ltr' })
1314
}

‎src/runtime/composables/defineShortcuts.ts

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export function extractShortcuts(items: any[] | any[][]) {
5959
return shortcuts
6060
}
6161

62+
/* @__NO_SIDE_EFFECTS__ */
6263
export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: ShortcutsOptions = {}) {
6364
const chainedInputs = ref<string[]>([])
6465
const clearChainedInput = () => {

‎src/runtime/composables/useKbd.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ const _useKbd = () => {
6767
}
6868
}
6969

70-
export const useKbd = createSharedComposable(_useKbd)
70+
export const useKbd = /* @__PURE__ */ createSharedComposable(_useKbd)

‎src/runtime/composables/useLocale.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ const _useLocale = (localeOverrides?: Ref<Locale<Messages> | undefined>) => {
1313
return buildLocaleContext<Messages>(computed(() => locale.value || en))
1414
}
1515

16-
export const useLocale = createSharedComposable(_useLocale)
16+
export const useLocale = /* @__PURE__ */ createSharedComposable(_useLocale)

‎src/runtime/composables/useOverlay.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ function _useOverlay() {
116116
}
117117
}
118118

119-
export const useOverlay = createSharedComposable(_useOverlay)
119+
export const useOverlay = /* @__PURE__ */ createSharedComposable(_useOverlay)

‎src/runtime/utils/tv.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import _appConfig from '#build/app.config'
44

55
const appConfigTv = _appConfig as AppConfig & { ui: { tv: typeof defaultConfig } }
66

7-
export const tv = createTV(appConfigTv.ui?.tv)
7+
export const tv = /* @__PURE__ */ createTV(appConfigTv.ui?.tv)

0 commit comments

Comments
 (0)
Please sign in to comment.