Skip to content

Commit 78bff58

Browse files
authored
🤖 Merge PR DefinitelyTyped#72186 [@types/jaro-winkler] Add options to type definition by @alexnault
1 parent 3752e37 commit 78bff58

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎types/jaro-winkler/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* Takes two strings and compares them. Returns a value from 0 to 1, 0 meaning that
33
* the strings are not at all similar.
44
*/
5-
declare function distance(x: string, y: string): number;
5+
declare function distance(x: string, y: string, options?: { caseSensitive?: boolean }): number;
66
export = distance;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import distance = require("jaro-winkler");
22

33
distance("hello", "hllo"); // $ExpectType number
4+
distance("hello", "hllo", {}); // $ExpectType number
5+
distance("hello", "hllo", { caseSensitive: false }); // $ExpectType number

0 commit comments

Comments
 (0)