mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Updates tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import franc = require('franc');
|
||||
import { detect } from 'franc';
|
||||
|
||||
const testText = 'This is an example sentence';
|
||||
const testOptions = {
|
||||
@@ -7,8 +7,8 @@ const testOptions = {
|
||||
blacklist: [],
|
||||
};
|
||||
|
||||
franc(testText);
|
||||
franc(testText, testOptions);
|
||||
detect(testText);
|
||||
detect(testText, testOptions);
|
||||
|
||||
franc.all(testText);
|
||||
franc.all(testText, testOptions)[0];
|
||||
detect.all(testText);
|
||||
detect.all(testText, testOptions)[0];
|
||||
|
||||
Vendored
+4
-2
@@ -11,8 +11,8 @@ export type Confidence = number;
|
||||
|
||||
export interface Options {
|
||||
minLength?: number;
|
||||
whitelist?: [ISO6393];
|
||||
blacklist?: [ISO6393];
|
||||
whitelist?: ISO6393[];
|
||||
blacklist?: ISO6393[];
|
||||
}
|
||||
|
||||
export function detect(text: string, options?: Options): ISO6393;
|
||||
@@ -20,3 +20,5 @@ export function detect(text: string, options?: Options): ISO6393;
|
||||
export namespace detect {
|
||||
function all(text: string, options?: Options): [ISO6393, number];
|
||||
}
|
||||
|
||||
export default detect;
|
||||
|
||||
Reference in New Issue
Block a user