Skip to content

Commit

Permalink
chore(sequence): deprecate compareStarts and compareEnds on IInterval…
Browse files Browse the repository at this point in the history
…Helpers (microsoft#17127)

Deprecates redundant methods on `IIntervalHelpers`. See
microsoft#17125 for their
subsequent removal and additional context.
  • Loading branch information
connorskees authored Sep 1, 2023
1 parent 771793f commit a830eca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/poor-friends-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@fluidframework/sequence": minor
---

deprecate compareStarts and compareEnds on IIntervalHelpers

these functions will be removed in a future version. use the methods IInterval.compareStart and IInterval.compareEnd respectively instead
4 changes: 2 additions & 2 deletions api-report/sequence.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ export interface IIntervalCollectionEvent<TInterval extends ISerializableInterva

// @public @sealed (undocumented)
export interface IIntervalHelpers<TInterval extends ISerializableInterval> {
// (undocumented)
// @deprecated (undocumented)
compareEnds(a: TInterval, b: TInterval): number;
// (undocumented)
// @deprecated (undocumented)
compareStarts?(a: TInterval, b: TInterval): number;
// (undocumented)
create(label: string, start: number | undefined, end: number | undefined, client: Client | undefined, intervalType: IntervalType, op?: ISequencedDocumentMessage, fromSnapshot?: boolean, stickiness?: IntervalStickiness): TInterval;
Expand Down
7 changes: 7 additions & 0 deletions packages/dds/sequence/src/intervals/intervalUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ export type CompressedSerializedInterval =
* @sealed
*/
export interface IIntervalHelpers<TInterval extends ISerializableInterval> {
/**
* @deprecated Use the method `IInterval.compareEnd` instead
*/
compareEnds(a: TInterval, b: TInterval): number;

/**
* @deprecated Use the method `IInterval.compareStart` instead
*/
compareStarts?(a: TInterval, b: TInterval): number;
/**
*
Expand Down

0 comments on commit a830eca

Please sign in to comment.