Created
August 30, 2022 20:14
-
-
Save tmcw/69afb85828afa11b979f9884b06474a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface MomentInput { | |
note?: string; | |
putFeatures: IWrappedFeatureInput[]; | |
deleteFeatures: IWrappedFeature["id"][]; | |
putFolders: IFolderInput[]; | |
deleteFolders: IFolder["id"][]; | |
} | |
export interface IPersistence { | |
useHistoryControl(): (direction: "undo" | "redo") => Promise<void>; | |
/** | |
* The main method for making changes to the map: give this | |
* a partial moment which can delete or add features and folders, | |
* and it'll implement it. Unless you specify that the change | |
* is quiet, the change is pushed onto the undo history. | |
*/ | |
useTransact(): ( | |
moment: Partial<MomentInput> & TransactOptions | |
) => Promise<void>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment