Skip to content

Commit efd660d

Browse files
committed
fix jsdoc
1 parent 8de4d81 commit efd660d

File tree

4 files changed

+12
-46
lines changed

4 files changed

+12
-46
lines changed

examples/lazy-loading/vite/src/i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { nextTick, isRef } from 'vue'
1+
import { nextTick } from 'vue'
22
import { createI18n } from 'vue-i18n'
33

44
import type { I18n, I18nOptions, Locale } from 'vue-i18n'

packages/petite-vue-i18n/src/vue.d.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import type {
99
DefineLocaleMessage,
1010
ExportedGlobalComposer,
1111
RemovedIndexResources,
12-
TranslateResult,
13-
VueI18n,
14-
VueI18nOptions
12+
TranslateResult
1513
} from '@intlify/vue-i18n-core/petite'
1614

1715
// --- THE CONTENT BELOW THIS LINE WILL BE APPENDED TO DTS FILE IN DIST DIRECTORY --- //
@@ -25,13 +23,6 @@ declare module 'vue' {
2523
* @VueI18nInjection
2624
*/
2725
export interface ComponentCustomOptions {
28-
/**
29-
* VueI18n options
30-
*
31-
* @remarks
32-
* See the {@link VueI18nOptions}
33-
*/
34-
i18n?: VueI18nOptions
3526
/**
3627
* For custom blocks options
3728
* @internal
@@ -51,23 +42,21 @@ declare module 'vue' {
5142
*/
5243
export interface ComponentCustomProperties {
5344
/**
54-
* Exported Global Composer instance, or global VueI18n instance.
45+
* Exported Global Composer instance
5546
*
5647
* @remarks
57-
* You can get the {@link ExportedGlobalComposer | exported composer instance} which are exported from global {@link Composer | composer instance} created with {@link createI18n}, or global {@link VueI18n | VueI18n instance}.
58-
* You can get the exported composer instance in {@link I18nMode | Composition API mode}, or the Vuei18n instance in {@link I18nMode | Legacy API mode}, which is the instance you can refer to with this property.
48+
* You can get the {@link ExportedGlobalComposer | exported composer instance} which are exported from global {@link Composer | composer instance} created with {@link createI18n}
49+
* You can get the exported composer instance in {@link I18nMode | Composition API mode}
5950
* The locales, locale messages, and other resources managed by the instance referenced by this property are valid as global scope.
6051
* If the `i18n` component custom option is not specified, it's the same as the VueI18n instance that can be referenced by the i18n instance {@link I18n.global | global} property.
6152
*/
62-
$i18n: VueI18n | ExportedGlobalComposer
53+
$i18n: ExportedGlobalComposer
6354
/**
6455
* Locale message translation
6556
*
6657
* @remarks
6758
* If this is used in a reactive context, it will re-evaluate once the locale changes.
6859
*
69-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#t | `VueI18n#t`}.
70-
*
7160
* In {@link I18nMode | Composition API mode}, the `$t` is injected by `app.config.globalProperties`.
7261
* the input / output is the same as for Composer, and it work on **global scope**. About that details, see {@link Composer#t | `Composer#t` }.
7362
*

packages/vue-i18n-core/src/i18n.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ import type { Disposer } from './types'
5353
/**
5454
* I18n Options for `createI18n`
5555
*
56-
* @remarks
57-
* `I18nOptions` is inherited {@link I18nAdditionalOptions}, {@link ComposerOptions} and {@link VueI18nOptions},
58-
* so you can specify these options.
59-
*
6056
* @VueI18nGeneral
6157
*/
6258
export type I18nOptions<
@@ -118,7 +114,7 @@ export interface I18n<
118114
> {
119115
// prettier-ignore
120116
/**
121-
* The property accessible to the global Composer instance or VueI18n instance
117+
* The property accessible to the global Composer instance
122118
*
123119
* An instance of this property is **global scope***.
124120
*/
@@ -139,7 +135,7 @@ export interface I18n<
139135
export type ComposerExtender = (composer: Composer) => Disposer | undefined
140136

141137
/**
142-
* The hooks that give to extend Composer (Composition API) and VueI18n instance (Options API).
138+
* The hooks that give to extend Composer (Composition API)
143139
* This hook is mainly for vue-i18n-routing and nuxt i18n.
144140
*
145141
* @internal
@@ -393,10 +389,10 @@ export function createI18n(options: any = {}): any {
393389
app.__VUE_I18N_SYMBOL__ = symbol
394390
app.provide(app.__VUE_I18N_SYMBOL__, i18n as unknown as I18n)
395391

396-
// set composer & vuei18n extend hook options from plugin options
392+
// set composer extend hook options from plugin options
397393
if (isPlainObject(options[0])) {
398394
const opts = options[0] as ExtendHooks
399-
// Plugin options cannot be passed directly to the function that creates Composer & VueI18n,
395+
// Plugin options cannot be passed directly to the function that creates Composer
400396
// so we keep it temporary
401397
;(i18n as unknown as I18nInternal).__composerExtend =
402398
opts.__composerExtend

packages/vue-i18n/src/vue.d.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import type {
2222
TranslateResult,
2323
Translation,
2424
VueI18nInstance,
25-
VueI18nOptions,
2625
VueMessageType
2726
} from '@intlify/vue-i18n-core'
2827

@@ -37,13 +36,6 @@ declare module 'vue' {
3736
* @VueI18nInjection
3837
*/
3938
export interface ComponentCustomOptions {
40-
/**
41-
* VueI18n options
42-
*
43-
* @remarks
44-
* See the {@link VueI18nOptions}
45-
*/
46-
i18n?: VueI18nOptions
4739
/**
4840
* For custom blocks options
4941
* @internal
@@ -63,11 +55,10 @@ declare module 'vue' {
6355
*/
6456
export interface ComponentCustomProperties {
6557
/**
66-
* Exported Global Composer instance, or global VueI18n instance.
58+
* Exported Global Composer instance
6759
*
6860
* @remarks
69-
* You can get the {@link ExportedGlobalComposer | exported composer instance} which are exported from global {@link Composer | composer instance} created with {@link createI18n}, or global {@link VueI18n | VueI18n instance}.
70-
* You can get the exported composer instance in {@link I18nMode | Composition API mode}, or the Vuei18n instance in {@link I18nMode | Legacy API mode}, which is the instance you can refer to with this property.
61+
* You can get the {@link ExportedGlobalComposer | exported composer instance} which are exported from global {@link Composer | composer instance} created with {@link createI18n}
7162
* The locales, locale messages, and other resources managed by the instance referenced by this property are valid as global scope.
7263
* If the `i18n` component custom option is not specified, it's the same as the VueI18n instance that can be referenced by the i18n instance {@link I18n.global | global} property.
7364
*/
@@ -78,8 +69,6 @@ declare module 'vue' {
7869
* @remarks
7970
* If this is used in a reactive context, it will re-evaluate once the locale changes.
8071
*
81-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#t | `VueI18n#t`}.
82-
*
8372
* In {@link I18nMode | Composition API mode}, the `$t` is injected by `app.config.globalProperties`.
8473
* the input / output is the same as for Composer, and it work on **global scope**. About that details, see {@link Composer#t | `Composer#t` }.
8574
*
@@ -422,8 +411,6 @@ declare module 'vue' {
422411
* @remarks
423412
* If this is used in a reactive context, it will re-evaluate once the locale changes.
424413
*
425-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#rt | `VueI18n#rt`}.
426-
*
427414
* In {@link I18nMode | Composition API mode}, the `$rt` is injected by `app.config.globalProperties`.
428415
* the input / output is the same as for Composer, and it work on **global scope**. About that details, see {@link Composer#rt | `Composer#rt` }.
429416
*
@@ -514,8 +501,6 @@ declare module 'vue' {
514501
* @remarks
515502
* If this is used in a reactive context, it will re-evaluate once the locale changes.
516503
*
517-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#d | `VueI18n#d` }.
518-
*
519504
* In {@link I18nMode | Composition API mode}, the `$d` is injected by `app.config.globalProperties`.
520505
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer#d | `Composer#d` }.
521506
*
@@ -676,8 +661,6 @@ declare module 'vue' {
676661
* @remarks
677662
* If this is used in a reactive context, it will re-evaluate once the locale changes.
678663
*
679-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#n | `VueI18n.n` }.
680-
*
681664
* In {@link I18nMode | Composition API mode}, the `$n` is injected by `app.config.globalProperties`.
682665
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer#n | `Composer.n` }.
683666
*
@@ -867,8 +850,6 @@ declare module 'vue' {
867850
/**
868851
* Locale messages getter
869852
*
870-
* In {@link I18nMode | Legacy API mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n#tm | `VueI18n#tm` }.
871-
*
872853
* @remarks
873854
* In {@link I18nMode | Composition API mode}, the `$tm` is injected by `app.config.globalProperties`.
874855
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer#tm | `Composer.tm` }.

0 commit comments

Comments
 (0)