Skip to content

Commit 7008918

Browse files
committed
refactor: rename
1 parent 3142660 commit 7008918

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/composer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export interface ComposerOptions {
109109
/**
110110
* @internal
111111
*/
112-
export interface ComposerOptionsInternal {
112+
export interface ComposerInternalOptions {
113113
__i18n?: CustomBlocks
114114
__root?: Composer
115115
}
@@ -200,7 +200,7 @@ function defineRuntimeMissingHandler(
200200
}
201201

202202
function getLocaleMessages(
203-
options: ComposerOptions & ComposerOptionsInternal,
203+
options: ComposerOptions & ComposerInternalOptions,
204204
locale: Locale
205205
): LocaleMessages {
206206
const { messages, __i18n } = options
@@ -268,7 +268,7 @@ export function addPreCompileMessages(
268268
* @internal
269269
*/
270270
export function createComposer(
271-
options: ComposerOptions & ComposerOptionsInternal = {}
271+
options: ComposerOptions & ComposerInternalOptions = {}
272272
): Composer {
273273
const { __root } = options
274274
const _isGlobal = __root === undefined

src/i18n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import {
1212
Composer,
1313
ComposerOptions,
14-
ComposerOptionsInternal,
14+
ComposerInternalOptions,
1515
createComposer
1616
} from './composer'
1717
import { createVueI18n, VueI18n, VueI18nOptions } from './legacy'
@@ -304,7 +304,7 @@ export function useI18n(options: UseI18nOptions = {}): Composer {
304304
let composer = i18n._getComposer(instance)
305305
if (composer == null) {
306306
const type = instance.type as ComponentOptions
307-
const composerOptions: ComposerOptions & ComposerOptionsInternal = {
307+
const composerOptions: ComposerOptions & ComposerInternalOptions = {
308308
...options
309309
}
310310
if (type.__i18n) {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export {
4040
createI18n,
4141
useI18n,
4242
I18nOptions,
43-
I18nAddtionalOptions,
43+
I18nAdditionalOptions,
4444
I18n,
4545
I18nMode,
4646
I18nScope,

src/legacy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
MissingHandler,
3131
Composer,
3232
ComposerOptions,
33-
ComposerOptionsInternal,
33+
ComposerInternalOptions,
3434
createComposer
3535
} from './composer'
3636
import {
@@ -159,8 +159,8 @@ export type VueI18n = {
159159
* @internal
160160
*/
161161
function convertComposerOptions(
162-
options: VueI18nOptions & ComposerOptionsInternal
163-
): ComposerOptions & ComposerOptionsInternal {
162+
options: VueI18nOptions & ComposerInternalOptions
163+
): ComposerOptions & ComposerInternalOptions {
164164
const locale = isString(options.locale) ? options.locale : 'en-US'
165165
const fallbackLocale =
166166
isString(options.fallbackLocale) ||
@@ -237,7 +237,7 @@ function convertComposerOptions(
237237
* @internal
238238
*/
239239
export function createVueI18n(
240-
options: VueI18nOptions & ComposerOptionsInternal = {}
240+
options: VueI18nOptions & ComposerInternalOptions = {}
241241
): VueI18n {
242242
const composer = createComposer(convertComposerOptions(options))
243243

src/mixin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ComponentOptions, getCurrentInstance } from 'vue'
22
import { Path } from './path'
33
import { Locale } from './core/context'
4-
import { Composer, ComposerOptionsInternal } from './composer'
4+
import { Composer, ComposerInternalOptions } from './composer'
55
import {
66
VueI18n,
77
createVueI18n,
@@ -29,7 +29,7 @@ export function defineMixin(
2929
const options = this.$options
3030
if (options.i18n) {
3131
const optionsI18n = options.i18n as VueI18nOptions &
32-
ComposerOptionsInternal
32+
ComposerInternalOptions
3333
if (options.__i18n) {
3434
optionsI18n.__i18n = options.__i18n
3535
}

0 commit comments

Comments
 (0)