From a830eca7571cfb230abe5b9443ba5c5fc44671e0 Mon Sep 17 00:00:00 2001 From: Connor Skees <39542938+connorskees@users.noreply.github.com> Date: Thu, 31 Aug 2023 23:10:06 -0400 Subject: [PATCH] chore(sequence): deprecate compareStarts and compareEnds on IIntervalHelpers (#17127) Deprecates redundant methods on `IIntervalHelpers`. See https://github.com/microsoft/FluidFramework/pull/17125 for their subsequent removal and additional context. --- .changeset/poor-friends-search.md | 7 +++++++ api-report/sequence.api.md | 4 ++-- packages/dds/sequence/src/intervals/intervalUtils.ts | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .changeset/poor-friends-search.md diff --git a/.changeset/poor-friends-search.md b/.changeset/poor-friends-search.md new file mode 100644 index 000000000000..cb1b6fc14aaf --- /dev/null +++ b/.changeset/poor-friends-search.md @@ -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 diff --git a/api-report/sequence.api.md b/api-report/sequence.api.md index 6d90e8a94107..cf6f65bb8d58 100644 --- a/api-report/sequence.api.md +++ b/api-report/sequence.api.md @@ -175,9 +175,9 @@ export interface IIntervalCollectionEvent { - // (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; diff --git a/packages/dds/sequence/src/intervals/intervalUtils.ts b/packages/dds/sequence/src/intervals/intervalUtils.ts index 32213e3e2da8..249fb6c7a7d0 100644 --- a/packages/dds/sequence/src/intervals/intervalUtils.ts +++ b/packages/dds/sequence/src/intervals/intervalUtils.ts @@ -168,7 +168,14 @@ export type CompressedSerializedInterval = * @sealed */ export interface IIntervalHelpers { + /** + * @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; /** *