Skip to main content

IFluidCodeDetailsComparer Interface

Provides capability to compare Fluid code details.

This API is provided for existing users, but is not recommended for new users.

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

MethodAlertsReturn TypeDescription
compare(a, b)BetaPromise<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)BetaPromise<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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;

Parameters

ParameterTypeDescription
aIFluidCodeDetails
bIFluidCodeDetails

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

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

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

Parameters

ParameterTypeDescription
candidateIFluidCodeDetails
constraintIFluidCodeDetails

Returns

Return type: Promise<boolean>