123456789101112131415161718192021222324252627282930313233343536373839404142 |
- module Version {
- export let currentVersion = [0, 1, 0];
- export function compareVersion (v1 : Array<number>, v2 : Array<number>) {
- if (v1[0] < v2[0]) return -1;
- else if (v1[0] > v2[0]) return 1;
- if (v1[1] < v2[1]) return -1;
- else if (v1[1] > v2[1]) return 1;
- if (v1[2] < v2[2]) return -1;
- else if (v1[2] > v2[2]) return 1;
- return 0;
- }
- export function getCurrentVersion () {
- let v = currentVersion;
- return v[0] + "." + v[1] + "." + v[2];
- }
- document.title = document.title + " [" + getCurrentVersion() + "] ";
- }
- // This is not really necessary...
- // class VersionUpdate {
- // private version : Array<number>;
- // private func : Function;
- //
- // public constructor (version : Array<number>, func : Function) {
- // this.version = version;
- // this.func = func;
- // }
- //
- // public run () {
- // this.func();
- // }
- // }
- //
- // class VersionUpdateList {
- //
- // }
|