add naturalSort typings

This commit is contained in:
a-morales
2016-03-22 15:59:26 -07:00
parent b14601af3f
commit dbc0042a03
2 changed files with 15 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
/// <reference path="./naturalSort.d.ts" />
import naturalSort = require("naturalSort");
[5, 3, 2, 4, 1].sort(naturalSort);
["a", "c", "b", "z", "w", "l"].sort(naturalSort);
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for NaturalSort
// Project: https://github.com/studio-b12/natural-sort
// Definitions by: Antonio Morales <https://github.com/a-morales>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "naturalSort" {
function naturalSort<T>(a: T, b: T): number;
export = naturalSort;
}