IFluidCodeDetailsComparer Interface
Provides capability to compare Fluid code details.
To use, import via @fluidframework/container-definitions/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer
Extends: IProvideFluidCodeDetailsComparer
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
compare(a, b) | Alpha |
Promise<number | undefined> |
Return a number representing the ascending sort order of the - - - - Similar semantics to: Array.sort |
satisfies(candidate, constraint) | Alpha |
Promise<boolean> |
Determines if the Similar semantics to: https://github.com/npm/node-semver#usage |
Method Details
compare
Return a number representing the ascending sort order of the a
and b
code details:
-
< 0
ifa < b
. -
= 0
ifa === b
. -
> 0
ifa > b
. -
undefined
ifa
is not comparable tob
.
Similar semantics to: Array.sort
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
Parameters
Parameter | Type | Description |
---|---|---|
a | IFluidCodeDetails | |
b | IFluidCodeDetails |
Returns
Return type: Promise<number | undefined>
satisfies
Determines if the candidate
code details satisfy the constraints specified in constraint
code details.
Similar semantics to: https://github.com/npm/node-semver#usage
To use, import via @fluidframework/container-definitions/alpha
.
For more information about our API support guarantees, see here.
Signature
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
candidate | IFluidCodeDetails | |
constraint | IFluidCodeDetails |
Returns
Return type: Promise<boolean>