From 2ef0c19e4503a5d3becd4aa7cdf37d9cb66c7047 Mon Sep 17 00:00:00 2001 From: "Yoo.gyoon James Chung" Date: Wed, 19 Feb 2020 03:37:14 +0900 Subject: [PATCH] Update type for Options interface in franc package (#42327) * Update type for Options interface in franc package As documented here: https://github.com/wooorm/franc/issues/80 adding this type enables the use of `franc.all` additionally with an `only` languages array when using TypeScript. Thank you! * Update index.d.ts update with recommended simple type declaration `ERROR: 16:12 array-type Array type using 'Array' is forbidden for simple types. Use 'T[]' instead.` --- types/franc/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/franc/index.d.ts b/types/franc/index.d.ts index 613c46946f..f5d4268db0 100644 --- a/types/franc/index.d.ts +++ b/types/franc/index.d.ts @@ -13,6 +13,7 @@ interface Options { minLength?: number; whitelist?: ISO6393[]; blacklist?: ISO6393[]; + only?: string[]; } declare function detect(text: string, options?: Options): ISO6393;