From 2cf3e4ba101a618972f8ef6ee30e19c8475228d8 Mon Sep 17 00:00:00 2001 From: Claudio Romano Date: Tue, 29 May 2018 16:54:59 +0200 Subject: [PATCH] fix(typescript): make options in constructor optional --- typings/index.d.ts | 2 +- typings/test/vue-i18next-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 9c0f7f5..4fc755b 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2,7 +2,7 @@ import { i18n, TranslationFunction, TranslationOptions } from "i18next"; import Vue, { PluginFunction } from "vue"; declare class VueI18Next { - constructor(i18next: i18n, options: VueI18NextOptions); + constructor(i18next: i18n, options?: VueI18NextOptions); i18next: i18n; t: TranslationFunction; resetVm: ({ }: { i18nLoadedAt: Date }) => void; diff --git a/typings/test/vue-i18next-tests.ts b/typings/test/vue-i18next-tests.ts index 217283d..20fdc41 100644 --- a/typings/test/vue-i18next-tests.ts +++ b/typings/test/vue-i18next-tests.ts @@ -16,7 +16,8 @@ i18next.init({ lng: "de", resources: {} }); -const i18n = new VueI18Next(i18next, {}); +const i18n = new VueI18Next(i18next); +const i18nWithOptions = new VueI18Next(i18next, {}); const vm = new Vue({ i18n