From 5ac8377dd6537fa9df477ef65632337490621140 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Tue, 28 Dec 2021 17:24:59 +0900 Subject: [PATCH] improvement: type definition order for vue-i18n-bridge integration (#1429) --- types/index.d.ts | 64 +++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index d7cf7c247..727bf7a64 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,3 +1,32 @@ +export type Path = VueI18n.Path; +export type Locale = VueI18n.Locale; +export type FallbackLocale = VueI18n.FallbackLocale; +export type Values = VueI18n.Values; +export type Choice = VueI18n.Choice; +export type MessageContext = VueI18n.MessageContext; +export type MessageFunction = VueI18n.MessageFunction; +export type LocaleMessage = VueI18n.LocaleMessage; +export type LocaleMessageObject = VueI18n.LocaleMessageObject; +export type LocaleMessageArray = VueI18n.LocaleMessageArray; +export type LocaleMessages = VueI18n.LocaleMessages; +export type TranslateResult = VueI18n.TranslateResult; +export type DateTimeFormatOptions = VueI18n.DateTimeFormatOptions; +export type DateTimeFormat = VueI18n.DateTimeFormat; +export type DateTimeFormats = VueI18n.DateTimeFormats; +export type DateTimeFormatResult = VueI18n.DateTimeFormatResult; +export type NumberFormatOptions = VueI18n.NumberFormatOptions; +export type NumberFormat = VueI18n.NumberFormat; +export type NumberFormats = VueI18n.NumberFormats; +export type NumberFormatResult = VueI18n.NumberFormatResult; +export type NumberFormatToPartsResult = VueI18n.NumberFormatToPartsResult; +export type WarnHtmlInMessageLevel = VueI18n.WarnHtmlInMessageLevel; +export type Formatter = VueI18n.Formatter; +export type MissingHandler = VueI18n.MissingHandler; +export type PostTranslationHandler = VueI18n.PostTranslationHandler; +export type IntlAvailability = VueI18n.IntlAvailability; +export type I18nOptions = VueI18n.I18nOptions; +export type PluignOptions = VueI18n.PluignOptions + import Vue, { PluginFunction } from 'vue'; declare namespace VueI18n { @@ -128,37 +157,10 @@ declare namespace VueI18n { componentInstanceCreatedListener?: ComponentInstanceCreatedListener; escapeParameterHtml?: boolean; } -} -export type Path = VueI18n.Path; -export type Locale = VueI18n.Locale; -export type FallbackLocale = VueI18n.FallbackLocale; -export type Values = VueI18n.Values; -export type Choice = VueI18n.Choice; -export type MessageContext = VueI18n.MessageContext; -export type MessageFunction = VueI18n.MessageFunction; -export type LocaleMessage = VueI18n.LocaleMessage; -export type LocaleMessageObject = VueI18n.LocaleMessageObject; -export type LocaleMessageArray = VueI18n.LocaleMessageArray; -export type LocaleMessages = VueI18n.LocaleMessages; -export type TranslateResult = VueI18n.TranslateResult; -export type DateTimeFormatOptions = VueI18n.DateTimeFormatOptions; -export type DateTimeFormat = VueI18n.DateTimeFormat; -export type DateTimeFormats = VueI18n.DateTimeFormats; -export type DateTimeFormatResult = VueI18n.DateTimeFormatResult; -export type NumberFormatOptions = VueI18n.NumberFormatOptions; -export type NumberFormat = VueI18n.NumberFormat; -export type NumberFormats = VueI18n.NumberFormats; -export type NumberFormatResult = VueI18n.NumberFormatResult; -export type NumberFormatToPartsResult = VueI18n.NumberFormatToPartsResult; -export type WarnHtmlInMessageLevel = VueI18n.WarnHtmlInMessageLevel; -export type Formatter = VueI18n.Formatter; -export type MissingHandler = VueI18n.MissingHandler; -export type PostTranslationHandler = VueI18n.PostTranslationHandler; -export type IntlAvailability = VueI18n.IntlAvailability; -export type I18nOptions = VueI18n.I18nOptions; -export type PluignOptions = { - bridge?: boolean + type PluignOptions = { + bridge?: boolean + } } export declare interface IVueI18n { @@ -262,7 +264,7 @@ declare class VueI18n { */ getChoiceIndex: (choice: number, choicesLength: number) => number; - static install: PluginFunction; + static install: PluginFunction; static version: string; static availabilities: VueI18n.IntlAvailability; }