/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { IChannelAttributes, IFluidDataStoreRuntime, Serializable } from "@fluidframework/datastore-definitions/internal"; import type { IJSONSegment, ISegment, PropertySet } from "@fluidframework/merge-tree/internal"; import { BaseSegment } from "@fluidframework/merge-tree/internal"; import { SharedSegmentSequence } from "./sequence.js"; /** * @deprecated IJSONRunSegment will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package * @internal */ export interface IJSONRunSegment extends IJSONSegment { items: Serializable[]; } /** * @deprecated SubSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package * @internal */ export declare class SubSequence extends BaseSegment { items: Serializable[]; static readonly typeString: string; static is(segment: ISegment): segment is SubSequence; static fromJSONObject(spec: any): SubSequence | undefined; readonly type: string; constructor(items: Serializable[], props?: PropertySet); toJSONObject(): IJSONRunSegment; clone(start?: number, end?: number): SubSequence; canAppend(segment: ISegment): boolean; toString(): string; append(segment: ISegment): void; removeRange(start: number, end: number): boolean; protected createSplitSegmentAt(pos: number): SubSequence | undefined; } /** * @deprecated SharedSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package * @internal */ export declare class SharedSequence extends SharedSegmentSequence> { id: string; constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, specToSegment: (spec: IJSONSegment) => ISegment); /** * Inserts items at the specified position in the sequence. * * @param pos - The position to insert the items at. * @param items - The items to insert. * @param props - Optional. Properties to set on the inserted items. */ insert(pos: number, items: Serializable[], props?: PropertySet): void; /** * Removes items from the sequence in the specified range. * * @param start - The inclusive start of the range to remove * @param end - The exclusive end of the range to remove */ remove(start: number, end: number): void; /** * Returns the total count of items in the sequence */ getItemCount(): number; /** * Gets the items in the specified range * * @param start - The inclusive start of the range * @param end - The exclusive end of the range */ getItems(start: number, end?: number): Serializable[]; } //# sourceMappingURL=sharedSequence.d.ts.map