import SemVer from 'semver/classes/semver' ; export class Version { private version ! : SemVer ; public setup ( version ) { this . version = new SemVer ( version ) ; } public getCurrentVersion ( ) { return this . version ; } public getMajorVersion ( ) { return this . version ?. major ; } public getNextMajorVersion ( ) { return this . version ?. major + 1 ; } public getPrevMajorVersion ( ) { return this . version ?. major - 1 ; } } export const versionService = new Version ( ) ;