@@ -80,13 +80,6 @@ export interface Formatter {
80
80
// eslint-disable-next-line @typescript-eslint/no-explicit-any
81
81
interpolate ( message : string , values : any , path : string ) : Array < any > | null
82
82
}
83
- export type ComponentInstanceCreatedListener = <
84
- Messages extends Record < string , any >
85
- > (
86
- target : VueI18n < Messages > ,
87
- global : VueI18n < Messages >
88
- ) => void
89
-
90
83
export type VueI18nExtender = ( vueI18n : VueI18n ) => Disposer | undefined
91
84
92
85
/**
@@ -330,17 +323,6 @@ export interface VueI18nOptions<
330
323
* @defaultValue `true`
331
324
*/
332
325
sync ?: boolean
333
- /**
334
- * @remarks
335
- * A handler for getting notified when component-local instance was created.
336
- *
337
- * The handler gets called with new and old (root) VueI18n instances.
338
- *
339
- * This handler is useful when extending the root VueI18n instance and wanting to also apply those extensions to component-local instance.
340
- *
341
- * @defaultValue `null`
342
- */
343
- componentInstanceCreatedListener ?: ComponentInstanceCreatedListener
344
326
/**
345
327
* @remarks
346
328
* A message resolver to resolve [`messages`](legacy#messages).
@@ -1314,9 +1296,6 @@ export interface VueI18nInternal<
1314
1296
NumberFormats extends Record < string , any > = { }
1315
1297
> {
1316
1298
__composer : Composer < Messages , DateTimeFormats , NumberFormats >
1317
- __onComponentInstanceCreated (
1318
- target : VueI18n < Messages , DateTimeFormats , NumberFormats >
1319
- ) : void
1320
1299
__enableEmitter ?: ( emitter : VueDevToolsEmitter ) => void
1321
1300
__disableEmitter ?: ( ) => void
1322
1301
__extender ?: VueI18nExtender
@@ -1796,14 +1775,6 @@ export function createVueI18n(options: any = {}, VueI18nLegacy?: any): any {
1796
1775
__DEV__ &&
1797
1776
warn ( getWarnMessage ( I18nWarnCodes . NOT_SUPPORTED_GET_CHOICE_INDEX ) )
1798
1777
return - 1
1799
- } ,
1800
-
1801
- // for internal
1802
- __onComponentInstanceCreated ( target : VueI18n < { } > ) : void {
1803
- const { componentInstanceCreatedListener } = options
1804
- if ( componentInstanceCreatedListener ) {
1805
- componentInstanceCreatedListener ( target , vueI18n )
1806
- }
1807
1778
}
1808
1779
}
1809
1780
0 commit comments