diff --git a/types/natural-compare-lite/index.d.ts b/types/natural-compare-lite/index.d.ts new file mode 100644 index 0000000000..d9dd5f3e6d --- /dev/null +++ b/types/natural-compare-lite/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for natural-compare-lite 1.4 +// Project: https://github.com/litejs/natural-compare-lite +// Definitions by: Doniyor Aliyev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function naturalCompare(a: string, b: string): -1 | 0 | 1; + +export = naturalCompare; diff --git a/types/natural-compare-lite/natural-compare-lite-tests.ts b/types/natural-compare-lite/natural-compare-lite-tests.ts new file mode 100644 index 0000000000..c82a695344 --- /dev/null +++ b/types/natural-compare-lite/natural-compare-lite-tests.ts @@ -0,0 +1,3 @@ +import compare = require("natural-compare-lite"); + +['a', 's', 'd'].sort(compare); diff --git a/types/natural-compare-lite/tsconfig.json b/types/natural-compare-lite/tsconfig.json new file mode 100644 index 0000000000..ddfcb244cb --- /dev/null +++ b/types/natural-compare-lite/tsconfig.json @@ -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" + ] +} diff --git a/types/natural-compare-lite/tslint.json b/types/natural-compare-lite/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/natural-compare-lite/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/natural-compare/index.d.ts b/types/natural-compare/index.d.ts new file mode 100644 index 0000000000..bb26b925f7 --- /dev/null +++ b/types/natural-compare/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for natural-compare 1.4 +// Project: https://github.com/litejs/natural-compare-lite +// Definitions by: Doniyor Aliyev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function naturalCompare(a: string, b: string): -1 | 0 | 1; + +export = naturalCompare; diff --git a/types/natural-compare/natural-compare-tests.ts b/types/natural-compare/natural-compare-tests.ts new file mode 100644 index 0000000000..d006905f47 --- /dev/null +++ b/types/natural-compare/natural-compare-tests.ts @@ -0,0 +1,3 @@ +import compare = require("natural-compare"); + +['a', 's', 'd'].sort(compare); diff --git a/types/natural-compare/tsconfig.json b/types/natural-compare/tsconfig.json new file mode 100644 index 0000000000..c8af37bb22 --- /dev/null +++ b/types/natural-compare/tsconfig.json @@ -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" + ] +} diff --git a/types/natural-compare/tslint.json b/types/natural-compare/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/natural-compare/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}