Skip to content 

@fluidframework/last-edited-experimental Package

Packages > @fluidframework/last-edited-experimental

Classes

List of classes contained in this package or namespace
Class Description
LastEditedTracker Tracks the last edit details such as the last edited user details and the last edited timestamp. The last edited details should be updated (via updateLastEditDetails) in response to a remote op since it uses shared summary block as storage.
LastEditedTrackerDataObject LastEditedTrackerDataObject creates a LastEditedTracker that keeps track of the latest edits to the document.

Functions

List of functions contained in this package or namespace
Function Description
setupLastEditedTrackerForContainer(lastEditedTracker, runtime, shouldDiscardMessageFn) Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container. It does the following: - Registers an "op" listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check if the message should be discarded. It also discards all scheduler message. If a message is not discarded, it passes the last edited information from the message to the last edited tracker. - The last edited information from the last message received before the lastEditedTracker is loaded is stored and passed tothe tracker once it loads.

Interfaces

List of interfaces contained in this package or namespace
Interface Description
IFluidLastEditedTracker
ILastEditDetails
IProvideFluidLastEditedTracker

Variables

List of variables contained in this package or namespace
Variable Description
IFluidLastEditedTracker

Functions

setupLastEditedTrackerForContainer

Helper function to set up a data object that provides IFluidLastEditedTracker to track last edited in a Container. It does the following: - Registers an “op” listener on the runtime. On each message, it calls the shouldDiscardMessageFn to check if the message should be discarded. It also discards all scheduler message. If a message is not discarded, it passes the last edited information from the message to the last edited tracker. - The last edited information from the last message received before the lastEditedTracker is loaded is stored and passed tothe tracker once it loads.

Signature:

export declare function setupLastEditedTrackerForContainer(lastEditedTracker: IFluidLastEditedTracker, runtime: IContainerRuntime, shouldDiscardMessageFn?: (message: ISequencedDocumentMessage) => boolean): void;

Parameters

List of parameters
Parameter Type Description
lastEditedTracker IFluidLastEditedTracker The last editied tracker.
runtime IContainerRuntime The container runtime whose messages are to be tracked.
shouldDiscardMessageFn (message: ISequencedDocumentMessage) => boolean Function that tells if a message should not be considered in computing last edited.

Returns:

void

Variables

IFluidLastEditedTracker

Signature:

IFluidLastEditedTracker: keyof IProvideFluidLastEditedTracker