Skip to content

Commit

Permalink
fix: tweak /* #__NO_SIDE_EFFECTS__ */
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Nov 2, 2023
1 parent ab9eafb commit 3882110
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/core-base/src/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function baseCompile(
return { ...baseCompileCore(message, options), detectError }
}

export const compileToFunction = /* #__NO_SIDE_EFFECTS__ */ <
/* #__NO_SIDE_EFFECTS__ */
export const compileToFunction = <
Message = string,
MessageSource = string | ResourceNode
>(
Expand Down
9 changes: 4 additions & 5 deletions packages/core-base/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,13 @@ export function registerLocaleFallbacker(fallbacker: LocaleFallbacker): void {
// Additional Meta for Intlify DevTools
let _additionalMeta: MetaInfo | null = /* #__PURE__*/ null

export const setAdditionalMeta = /* #__NO_SIDE_EFFECTS__ */ (
meta: MetaInfo | null
): void => {
/* #__NO_SIDE_EFFECTS__ */
export const setAdditionalMeta = (meta: MetaInfo | null): void => {
_additionalMeta = meta
}

export const getAdditionalMeta =
/* #__NO_SIDE_EFFECTS__ */ (): MetaInfo | null => _additionalMeta
/* #__NO_SIDE_EFFECTS__ */
export const getAdditionalMeta = (): MetaInfo | null => _additionalMeta

let _fallbackContext: CoreContext | null = null

Expand Down
3 changes: 2 additions & 1 deletion packages/vue-i18n-core/src/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,8 @@ function defineCoreMissingHandler(missing: MissingHandler): CoreMissingHandler {
}

// for Intlify DevTools
const getMetaInfo = /* #__NO_SIDE_EFFECTS__ */ (): MetaInfo | null => {
/* #__NO_SIDE_EFFECTS__ */
const getMetaInfo = (): MetaInfo | null => {
const instance = getCurrentInstance()
let meta: any = null // eslint-disable-line @typescript-eslint/no-explicit-any
return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])
Expand Down
3 changes: 2 additions & 1 deletion packages/vue-i18n-core/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,8 @@ export function useI18n<
*
* @VueI18nGeneral
*/
export const castToVueI18n = /* #__NO_SIDE_EFFECTS__ */ (
/* #__NO_SIDE_EFFECTS__ */
export const castToVueI18n = (
i18n: I18n
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): VueI18n & { install: (Vue: any, options?: any) => void } => {
Expand Down

0 comments on commit 3882110

Please sign in to comment.