DefinitelyTyped/types/didyoumean/index.d.ts
James George f8c4d9046d Add types for didyoumean.js (#35950)
* Add types for didyoumean

* Minor fix
2019-06-06 11:30:59 -07:00

24 lines
605 B
TypeScript

// Type definitions for didyoumean 1.2
// Project: https://github.com/dcporter/didyoumean.js
// Definitions by: James George <https://github.com/jamesgeorge007>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
export = didYouMean;
declare function didYouMean(str: string, list: string[], key?: string): string | string[];
declare namespace didYouMean {
let caseSensitive: boolean;
let nullResultValue: any;
let returnFirstMatch: boolean;
let returnWinningObject: boolean;
let threshold: number;
let thresholdAbsolute: number;
}