diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-10-15 19:28:35 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-10-15 20:30:33 +0200 |
commit | 8b2f53e3ed810a0539f76feb993f0044bc8c0f38 (patch) | |
tree | f88687b498f133e8e7c0743def7ef7929f6173c6 /src/libtoolVersion.ts | |
parent | 353eeca339e060eb4a03e0b67343086854a5e5d7 (diff) | |
download | wallet-core-8b2f53e3ed810a0539f76feb993f0044bc8c0f38.tar.xz |
fix tslint warnings
Diffstat (limited to 'src/libtoolVersion.ts')
-rw-r--r-- | src/libtoolVersion.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libtoolVersion.ts b/src/libtoolVersion.ts index 8800fde03..cc2435b94 100644 --- a/src/libtoolVersion.ts +++ b/src/libtoolVersion.ts @@ -16,7 +16,7 @@ /** * Semantic versioning, but libtool-style. - * See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html + * See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html */ @@ -32,7 +32,7 @@ export interface VersionMatchResult { * Is the first version older (-1), newser (+1) or * identical (0)? */ - currentCmp: number + currentCmp: number; } interface Version { @@ -41,6 +41,9 @@ interface Version { age: number; } +/** + * Compare two libtool-style version strings. + */ export function compare(me: string, other: string): VersionMatchResult|undefined { const meVer = parseVersion(me); const otherVer = parseVersion(other); @@ -60,7 +63,7 @@ export function compare(me: string, other: string): VersionMatchResult|undefined function parseVersion(v: string): Version|undefined { const [currentStr, revisionStr, ageStr, ...rest] = v.split(":"); - if (rest.length != 0) { + if (rest.length !== 0) { return undefined; } const current = Number.parseInt(currentStr); |