Add types for compare-versions

This commit is contained in:
Leonid Logvinov 2018-05-29 15:36:16 -07:00
parent 8091b46536
commit cb3a40f3e4
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
4 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import compareVersions = require('compare-versions');
compareVersions('1.0.0', '2.0.0');

7
types/compare-versions/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
// Type definitions for compare-versions 3.0
// Project: https://github.com/omichelsen/compare-versions
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function compareVersions(firstVersion: string, secondVersion: string): number;
export = compareVersions;

View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "compare-versions-tests.ts"]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }