Merge pull request #33084 from doniyor2109/natural-compare

Added type definition for natural-compare-lite (alias natural-compare)
This commit is contained in:
Mine Starks
2019-02-15 09:37:02 -08:00
committed by GitHub
8 changed files with 74 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for natural-compare-lite 1.4
// Project: https://github.com/litejs/natural-compare-lite
// Definitions by: Doniyor Aliyev <https://github.com/doniyor2109>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function naturalCompare(a: string, b: string): -1 | 0 | 1;
export = naturalCompare;
@@ -0,0 +1,3 @@
import compare = require("natural-compare-lite");
['a', 's', 'd'].sort(compare);
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"natural-compare-lite-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for natural-compare 1.4
// Project: https://github.com/litejs/natural-compare-lite
// Definitions by: Doniyor Aliyev <https://github.com/doniyor2109>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function naturalCompare(a: string, b: string): -1 | 0 | 1;
export = naturalCompare;
@@ -0,0 +1,3 @@
import compare = require("natural-compare");
['a', 's', 'd'].sort(compare);
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"natural-compare-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}