mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Updates exports to only export 'detect'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { detect } from 'franc';
|
||||
import * as detect from 'franc';
|
||||
|
||||
const testText = 'This is an example sentence';
|
||||
const testOptions = {
|
||||
|
||||
12
types/franc/index.d.ts
vendored
12
types/franc/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user