import { ViewKey } from "@anz-bank/vscode-sysl-model"; /** * A view edit represents edits that should be applied to a view's model. * * What the edit contains and how it is interpreted is up to the view. */ export type ViewEdit = SetEdit | UpdateEdit; export type SetEdit = { /** The model to set on a view. */ model: T; }; export type UpdateEdit = { /** A change to apply to a view. */ delta: D; }; /** * ViewEdits is a collection of changes for multiple views. * * Use the {@link views.applyEdit applyEdit} function to apply the changes. */ export declare class ViewEdits { /** The individual edits added to the batch. */ private readonly _edits; /** The number of edit entries in the change set. */ get size(): number; /** The entries in the change set. */ entries(): [ViewKey, ViewEdit[]][]; /** Adds an edit to set the model of a view. */ set(key: ViewKey, model: T): ViewEdits; /** Adds an edit to update the model of a view. */ update(key: ViewKey, delta: D): ViewEdits; toJSON(): [ViewKey, ViewEdit[]][]; }