From f130b210864cfad3699a7cfb6f9dc0972e7352b0 Mon Sep 17 00:00:00 2001 From: Dimitrios Pappas Date: Tue, 9 Aug 2022 15:20:25 +0200 Subject: [PATCH 1/2] index.d.ts: change Options.isHTML to boolean type --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index b295da0..4d6b6b0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,7 @@ interface Chunk { readonly bytes: number; } interface Options { - readonly isHTML: false; + readonly isHTML: boolean; readonly languageHint: string; readonly encodingHint: string; readonly tldHint: string; @@ -27,4 +27,4 @@ export declare module 'cld' { declare function detect(text: string, options: Options, callback: (err: string, result: DetectLanguage) => void): void; declare function detect(text: string, callback: (err: string, result: DetectLanguage) => void): void; declare function detect(text: string, options: Options): Promise; -} \ No newline at end of file +} From 435950b861c0e17d29123bc01035a92259f79e8f Mon Sep 17 00:00:00 2001 From: Dimitrios Pappas Date: Tue, 9 Aug 2022 15:44:34 +0200 Subject: [PATCH 2/2] index.d.ts: add missing declaration for detect --- index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.d.ts b/index.d.ts index 4d6b6b0..bae3eef 100644 --- a/index.d.ts +++ b/index.d.ts @@ -27,4 +27,5 @@ export declare module 'cld' { declare function detect(text: string, options: Options, callback: (err: string, result: DetectLanguage) => void): void; declare function detect(text: string, callback: (err: string, result: DetectLanguage) => void): void; declare function detect(text: string, options: Options): Promise; + declare function detect(text: string): Promise; }