string score definitions

This commit is contained in:
Marcin Porebski
2015-08-19 18:48:48 +02:00
parent 3ef00546da
commit cb2b22f81a
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
/// <reference path="string_score.d.ts" />
import string_score = require('string_score');
var a = 'abc';
var b = 'xyz';
console.log(a.score(b).toString());
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for url-template 0.1.22
// Project: https://github.com/joshaven/string_score
// Definitions by: Marcin Porębski <https://github.com/marcinporebski/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface String {
score: (word: string, fuzzy?: number) => number;
}