Updates exports to only export 'detect'

This commit is contained in:
William LeGate
2018-09-17 16:24:52 -07:00
parent 91945dbd9a
commit 0be5866832
2 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { detect } from 'franc';
import * as detect from 'franc';
const testText = 'This is an example sentence';
const testOptions = {

View File

@@ -4,19 +4,21 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// ISO 639-3 code (see: https://iso639-3.sil.org/code_tables/639/data)
export type ISO6393 = string;
type ISO6393 = string;
// Range [0, 1]
export type Confidence = number;
type Confidence = number;
export interface Options {
interface Options {
minLength?: number;
whitelist?: ISO6393[];
blacklist?: ISO6393[];
}
export function detect(text: string, options?: Options): ISO6393;
declare function detect(text: string, options?: Options): ISO6393;
export namespace detect {
declare namespace detect {
function all(text: string, options?: Options): [ISO6393, number];
}
export = detect;