Skip to main content
Version: v1

IFluidCodeDetailsComparer Interface

Provides capability to compare Fluid code details.

Signature

export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer

Extends: IProvideFluidCodeDetailsComparer

Methods

Method Return Type Description
compare(a, b) Promise<number | undefined>

Return a number representing the ascending sort order of the a and b code details; < 0 if a < b. = 0 if a === b. > 0 if a > b. undefined if a is not comparable to b.

Similar semantics to: Array.sort

satisfies(candidate, constraint) Promise<boolean>

Determines if the candidate code details satisfy the constraints specified in constraint code details.

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 if a < b. = 0 if a === b. > 0 if a > b. undefined if a is not comparable to b.

Similar semantics to: Array.sort

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

Signature

satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;

Parameters

Parameter Type Description
candidate IFluidCodeDetails
constraint IFluidCodeDetails

Returns

Return type: Promise<boolean>