From 615194bdbccfa9fe8e69f47442a3d2806b33b045 Mon Sep 17 00:00:00 2001 From: Daomtthuan Date: Sat, 10 Dec 2022 20:38:45 +0700 Subject: [PATCH] Update `LanguageDetectorAsyncModule` Add return type `Promise` for `LanguageDetectorAsyncModule` --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 927e517b..36cd5385 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1067,10 +1067,10 @@ export interface LanguageDetectorAsyncModule extends Module { type: 'languageDetector'; /** Set to true to enable async detection */ async: true; - init(services: Services, detectorOptions: object, i18nextOptions: InitOptions): void; + init(services: Services, detectorOptions: object, i18nextOptions: InitOptions): void | Promise; /** Must call callback passing detected language */ - detect(callback: (lng: string | readonly string[] | undefined) => void): void; - cacheUserLanguage(lng: string): void; + detect(callback: (lng: string | readonly string[] | undefined) => void): void | Promise; + cacheUserLanguage(lng: string): void | Promise; } /**