Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/api-extractor-model > ReleaseTag > compare

ReleaseTag.compare() function

Compares two ReleaseTag values. Their values must not be ReleaseTag.None.

Signature:

function compare(a: ReleaseTag, b: ReleaseTag): number;

Parameters

ParameterTypeDescription
aReleaseTag
bReleaseTag

Returns:

number

0 if a and b are equal, a positive number if a is more public than b, and a negative number if a is less public than b.

Remarks

For example, compareReleaseTag(ReleaseTag.Beta, ReleaseTag.Alpha) will return a positive number because beta is more public than alpha.