Home > @magiclane/maps-sdk > Version

Version class

Define the content version with major and minor.

Signature:

export declare class Version 

Constructors

Constructor

Modifiers

Description

(constructor)(encodedVersion)

Constructs a new instance of the Version class

Properties

Property

Modifiers

Type

Description

isValid

readonly

boolean

Checks if this version is valid (not zero)

major

readonly

number

Major version number

minor

readonly

number

Minor version number

Methods

Method

Modifiers

Description

compareTo(other)

Compares this version with another version

equals(other)

Checks if this version equals another version

fromJson(json)

static

Creates a Version from JSON data

fromMajorAndMinor({ major, minor }, input)

static

Creates a Version from major and minor numbers

hashCode()

Returns a hash code for this version

toString()

Returns a string representation of this version