This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp core library.version.satisfies
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > Version > satisfies
Tests whether this version satisfies the compatibility requirements of the input version, i.e. is backwards compatible.
Signature:
satisfies(compareWith: Version): boolean;
Parameter | Type | Description |
---|---|---|
compareWith | Version | The version to compare with |
Returns:
boolean
A boolean indicating if this version is compatible with the input parameter
In order to satisfy the compatibility requirements, this object must have the same major version number as the input parameter, and it must NOT be older than the input parameter.
Examples:
1.0.0 satisfies 1.0.0 -> true;
1.1.0 satisfies 1.0.0 -> true;
2.0.0 satisfies 1.0.0 -> false;
1.0.0 satisfies 1.1.0 -> false