sp core library.version.satisfies - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki
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