From 92d0b19addcc7220c04f3e7bb28180013d9d58fe Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Mon, 22 May 2023 18:44:54 +0300 Subject: [PATCH] fix: make d.ts files express the correct type --- plugin.d.ts | 12 +++++++++--- webpack.d.ts | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/plugin.d.ts b/plugin.d.ts index d130862..175cb17 100644 --- a/plugin.d.ts +++ b/plugin.d.ts @@ -1,4 +1,10 @@ -export class HMRPlugin { - constructor(options: Partial<{ client: boolean; server: boolean }>); - init(i18n); +export declare class HMRPlugin { + type: '3rdParty'; + constructor(hmrOptions: Partial<{ + client: boolean; + server: boolean; + }>); + init(i18nInstance: any): void; + toJSON(): null; + toString(): string; } diff --git a/webpack.d.ts b/webpack.d.ts index 9442ce9..54648e5 100644 --- a/webpack.d.ts +++ b/webpack.d.ts @@ -1,5 +1,6 @@ -export class I18NextHMRPlugin { +export declare class I18NextHMRPlugin { static addListener(cb: (data: { lang: string; ns: string }) => void): void; constructor(options: { localesDir: string; } | { localesDirs: string[] }); } +