Merge pull request #8689 from a-morales/create-natural-sort

add naturalSort typings
This commit is contained in:
Horiuchi_H
2016-03-28 17:29:42 +09:00
2 changed files with 15 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
/// <reference path="./natural-sort.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;
}