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<T>' is forbidden for simple types. Use 'T[]' instead.`
This commit is contained in:
Yoo.gyoon James Chung 2020-02-19 03:37:14 +09:00 committed by GitHub
parent 09262345ab
commit 2ef0c19e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ interface Options {
minLength?: number;
whitelist?: ISO6393[];
blacklist?: ISO6393[];
only?: string[];
}
declare function detect(text: string, options?: Options): ISO6393;