mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #33084 from doniyor2109/natural-compare
Added type definition for natural-compare-lite (alias natural-compare)
This commit is contained in:
+8
@@ -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);
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Vendored
+8
@@ -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);
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user