From cb2b22f81a17658943fbcb06f15c0bde4e60e79c Mon Sep 17 00:00:00 2001 From: Marcin Porebski Date: Wed, 19 Aug 2015 18:48:48 +0200 Subject: [PATCH] string score definitions --- string_score/string_score-tests.ts | 8 ++++++++ string_score/string_score.d.ts | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 string_score/string_score-tests.ts create mode 100644 string_score/string_score.d.ts diff --git a/string_score/string_score-tests.ts b/string_score/string_score-tests.ts new file mode 100644 index 000000000..8a7399603 --- /dev/null +++ b/string_score/string_score-tests.ts @@ -0,0 +1,8 @@ +/// + +import string_score = require('string_score'); + +var a = 'abc'; +var b = 'xyz'; + +console.log(a.score(b).toString()); diff --git a/string_score/string_score.d.ts b/string_score/string_score.d.ts new file mode 100644 index 000000000..2d901ba39 --- /dev/null +++ b/string_score/string_score.d.ts @@ -0,0 +1,8 @@ +// Type definitions for url-template 0.1.22 +// Project: https://github.com/joshaven/string_score +// Definitions by: Marcin Porębski +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface String { + score: (word: string, fuzzy?: number) => number; +}